Skip to content

Commit 0cf8838

Browse files
committed
test: keep accelerated bridge timers referenced
1 parent d93969e commit 0cf8838

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • linux-features/shared-app-server-socket

linux-features/shared-app-server-socket/test.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,13 @@ function loadInjectedTransport({ spawnImpl, WebSocketImpl = null, fsImpl = fs, t
145145
return require(id);
146146
},
147147
setTimeout(callback, delay, ...args) {
148-
return setTimeout(callback, timeoutCapMs == null ? delay : Math.min(delay, timeoutCapMs), ...args);
148+
const timer = setTimeout(
149+
callback,
150+
timeoutCapMs == null ? delay : Math.min(delay, timeoutCapMs),
151+
...args,
152+
);
153+
if (timeoutCapMs != null) timer.unref = () => timer;
154+
return timer;
149155
},
150156
clearTimeout,
151157
};

0 commit comments

Comments
 (0)