From 758bb8fef7f6322aee60edb9804164e0c3447bb4 Mon Sep 17 00:00:00 2001 From: wukko Date: Mon, 6 Nov 2023 06:44:34 +0600 Subject: [PATCH] types: added comments --- src/modules/stream/types.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/stream/types.js b/src/modules/stream/types.js index 38ebc68..dc9579a 100644 --- a/src/modules/stream/types.js +++ b/src/modules/stream/types.js @@ -16,9 +16,11 @@ function closeResponse(res) { } function killProcess(p) { + // ask the process to terminate itself gracefully p?.kill('SIGTERM'); setTimeout(() => { if (p?.exitCode === null) + // brutally murder the process if it didn't quit p?.kill('SIGKILL'); }, 5000); }