close chidl processes when parent exits

This commit is contained in:
Jan Prochazka
2020-05-01 09:35:57 +02:00
parent 17134552ce
commit 933f29afda
9 changed files with 39 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
const engines = require('@dbgate/engines');
const driverConnect = require('../utility/driverConnect');
const childProcessChecker = require('../utility/childProcessChecker');
let systemConnection;
let storedConnection;
@@ -67,6 +68,7 @@ async function handleMessage({ msgtype, ...other }) {
}
function start() {
childProcessChecker();
process.on('message', async (message) => {
try {
await handleMessage(message);