Skip to content

Commit 5185f38

Browse files
committed
Avoid keeping Node alive with timeout signals
1 parent 955f00a commit 5185f38

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

packages/tools/src/abort.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const createAbortError = () =>
44
export const getTimeoutSignal = (timeout: number): AbortSignal => {
55
const controller = new AbortController();
66
const timeoutId = setTimeout(() => controller.abort(createAbortError()), timeout);
7+
timeoutId.unref?.();
78

89
controller.signal.addEventListener(
910
'abort',

0 commit comments

Comments
 (0)