From 311e5c57f3e1cb19978e7f59c7ba02e1e439ba44 Mon Sep 17 00:00:00 2001 From: cgeek <cem.moreau@gmail.com> Date: Wed, 4 Jan 2017 10:21:50 +0100 Subject: [PATCH] [fix] Webmin adaptation to the new "module" architecture --- server/controller/webmin.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/server/controller/webmin.js b/server/controller/webmin.js index 3785c13..aefa69b 100644 --- a/server/controller/webmin.js +++ b/server/controller/webmin.js @@ -46,9 +46,9 @@ function WebAdmin (duniterServer) { 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 *() { @@ -117,6 +117,9 @@ function WebAdmin (duniterServer) { this.startHTTP = () => co(function *() { yield pluggedDALP; try { + if (!bmapi) { + bmapi = yield bma(server, null, true); + } yield bmapi.openConnections(); return { success: true }; } catch (e) { @@ -265,7 +268,7 @@ function WebAdmin (duniterServer) { yield bmapi.closeConnections(); yield server.loadConf(); bmapi = yield bma(server, null, true); - // yield bmapi.openConnections(); + yield bmapi.openConnections(); yield server.recomputeSelfPeer(); }); yield pluggedConfP; -- GitLab