From 5a0118aedd4ca88b9969956f6ccfb95c9b1635a9 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Mon, 29 Nov 2021 13:45:15 +0100 Subject: [PATCH] Added error-handling for process --- src/main.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.js b/src/main.js index 4841b4c..7065a7d 100644 --- a/src/main.js +++ b/src/main.js @@ -75,6 +75,10 @@ if(errorMsg){ loggerTcpdump.error(data); }); + proc.on("error", (err) => { + loggerTcpdump.error(err); + }); + logger.debug("Attaching exit-handler.."); proc.on("exit", (code) => { loggerTcpdump.debug(`tcpdump exited code: ${code}`);