Skip to content

Commit

Permalink
Unref the timeout, so that we do not keep the process open forever
Browse files Browse the repository at this point in the history
Signed-off-by: Matteo Collina <[email protected]>
  • Loading branch information
mcollina committed Oct 10, 2024
1 parent 15ac477 commit 9dcc502
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 9dcc502

Please sign in to comment.