diff --git a/streaming/index.js b/streaming/index.js index 31c597cf0ce..198eac1ae4d 100644 --- a/streaming/index.js +++ b/streaming/index.js @@ -563,12 +563,14 @@ const startWorker = (workerId) => { const onError = (err) => { log.error(err); + server.close(); + process.exit(0); }; process.on('SIGINT', onExit); process.on('SIGTERM', onExit); process.on('exit', onExit); - process.on('error', onError); + process.on('uncaughtException', onError); }; throng({