conflict in blockchain.js

This commit is contained in:
Jonathan Rainville 2018-05-30 11:02:01 -04:00
parent b0a64cc043
commit a88ab82261
1 changed files with 4 additions and 4 deletions

View File

@ -109,13 +109,14 @@ class Blockchain {
registerServiceCheck() { registerServiceCheck() {
const self = this; const self = this;
const NO_NODE = 'noNode';
this.addCheck('Ethereum', function (cb) { this.addCheck('Ethereum', function (cb) {
async.waterfall([ async.waterfall([
function checkNodeConnection(next) { function checkNodeConnection(next) {
self.assertNodeConnection(true, (err) => { self.assertNodeConnection(true, (err) => {
if (err) { if (err) {
return next(true, {name: "No Blockchain node found", status: 'off'}); return next(NO_NODE, {name: "No Blockchain node found", status: 'off'});
} }
next(); next();
}); });
@ -137,9 +138,8 @@ class Blockchain {
}); });
} }
], (err, statusObj) => { ], (err, statusObj) => {
if (err && err !== true) { if (err && err !== NO_NODE) {
self.logger.error(err); return cb(err);
return;
} }
cb(statusObj); cb(statusObj);
}); });