From 9dcc502d10103f60a7aa6ef57a9df1a857f11e9f Mon Sep 17 00:00:00 2001 From: Matteo Collina Date: Thu, 10 Oct 2024 12:12:27 +0200 Subject: [PATCH] Unref the timeout, so that we do not keep the process open forever Signed-off-by: Matteo Collina --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index 2d46c71..c0b71ce 100644 --- a/index.js +++ b/index.js @@ -79,6 +79,7 @@ function createThreadInterceptor (opts) { inflights.delete(id) handler.onError(new Error(`Timeout while waiting from a response from ${url.hostname}`)) }, timeout) + handle.unref() } inflights.set(id, (err, res) => {