diff --git a/lib/index.js b/lib/index.js index f98c1782..c182bcfd 100644 --- a/lib/index.js +++ b/lib/index.js @@ -354,12 +354,15 @@ class Embark { }) .catch(callback); }); - - engine.events.request('deploy:contracts', function (err) { - engine.logger.info(__("finished deploying").underline); - if (err) { - callback(err); - } + engine.events.on('check:backOnline:Ethereum', function () { + engine.logger.info(__('Ethereum node detected') + '..'); + engine.config.reloadConfig(); + engine.events.request('deploy:contracts', function (err) { + if (err) { + return; + } + engine.logger.info(__('Deployment Done')); + }); }); } ], function (err, _result) {