Browse Source

catch coind proc exit

v0.25
pbca26 7 years ago
parent
commit
bf97074d78
  1. 11
      routes/shepherd/daemonControl.js
  2. 3
      routes/shepherd/dashboardUpdate.js

11
routes/shepherd/daemonControl.js

@ -237,7 +237,16 @@ module.exports = (shepherd) => {
}).pipe(logStream);
_daemonChildProc.on('exit', (exitCode) => {
}).pipe(logStream);
const _errMsg = exitCode === 0 ? `${_daemonName} exited with code ${exitCode}` : `${_daemonName} exited with code ${exitCode}, crashed?`;
fs.appendFile(_daemonLogName, _errMsg, (err) => {
if (err) {
shepherd.writeLog(_errMsg);
shepherd.log(_errMsg);
}
shepherd.log(_errMsg);
});
});
}
}
} else {

3
routes/shepherd/dashboardUpdate.js

@ -69,7 +69,8 @@ module.exports = (shepherd) => {
}))
.then(result => {
if (result[0] &&
result[0].length) {
result[0].length &&
result[0][0].address) {
const calcBalance = (result, json) => {
if (json &&
json.length &&

Loading…
Cancel
Save