Say once why the hold timer is not unref'd

This commit is contained in:
2026-09-01 10:48:20 +02:00
parent 2c0dfd172f
commit 2fe36fa4e8
3 changed files with 4 additions and 6 deletions
+1 -2
View File
@@ -110,8 +110,7 @@ export class LinkGate {
settle({ err: aborted() });
}
// Deliberately not unref()'d: a held request is awaited with a destroyed socket and no
// other handle, so an unref'd timer lets the process exit without ever settling it.
// Not unref()'d: a held request is awaited with no other handle, so the process would exit unsettled.
if (left > 0) timer = setTimeout(giveUp, left);
signal?.addEventListener('abort', onAbort, { once: true });