mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 18:26:00 +00:00
fixed error logging
This commit is contained in:
@@ -8,11 +8,11 @@ function childProcessChecker() {
|
||||
setInterval(() => {
|
||||
try {
|
||||
process.send({ msgtype: 'ping', counter: counter++ });
|
||||
} catch (ex) {
|
||||
} catch (err) {
|
||||
// This will come once parent dies.
|
||||
// One way can be to check for error code ERR_IPC_CHANNEL_CLOSED
|
||||
// and call process.exit()
|
||||
logger.error('parent died', ex);
|
||||
logger.error({ err }, 'parent died');
|
||||
process.exit(1);
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
Reference in New Issue
Block a user