Skip to content
Snippets Groups Projects
Commit 311e5c57 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[fix] Webmin adaptation to the new "module" architecture

parent 101a5234
Branches
Tags
No related merge requests found
...@@ -46,9 +46,9 @@ function WebAdmin (duniterServer) { ...@@ -46,9 +46,9 @@ function WebAdmin (duniterServer) {
let startServicesP, stopServicesP; let startServicesP, stopServicesP;
let pluggedConfP = plugForConf(); let pluggedConfP = Promise.resolve(); // Initially, the node is already plugged in
let pluggedDALP = replugDAL(); let pluggedDALP = Promise.resolve(); // Initially, the node is already plugged in
this.pushEntity = (req, rawer, type) => co(function *() { this.pushEntity = (req, rawer, type) => co(function *() {
...@@ -117,6 +117,9 @@ function WebAdmin (duniterServer) { ...@@ -117,6 +117,9 @@ function WebAdmin (duniterServer) {
this.startHTTP = () => co(function *() { this.startHTTP = () => co(function *() {
yield pluggedDALP; yield pluggedDALP;
try { try {
if (!bmapi) {
bmapi = yield bma(server, null, true);
}
yield bmapi.openConnections(); yield bmapi.openConnections();
return { success: true }; return { success: true };
} catch (e) { } catch (e) {
...@@ -265,7 +268,7 @@ function WebAdmin (duniterServer) { ...@@ -265,7 +268,7 @@ function WebAdmin (duniterServer) {
yield bmapi.closeConnections(); yield bmapi.closeConnections();
yield server.loadConf(); yield server.loadConf();
bmapi = yield bma(server, null, true); bmapi = yield bma(server, null, true);
// yield bmapi.openConnections(); yield bmapi.openConnections();
yield server.recomputeSelfPeer(); yield server.recomputeSelfPeer();
}); });
yield pluggedConfP; yield pluggedConfP;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment