diff --git a/test/sequential/test-http2-session-timeout.js b/test/sequential/test-http2-session-timeout.js index 5c4f047b338e9c..9f0c8cd4d003c8 100644 --- a/test/sequential/test-http2-session-timeout.js +++ b/test/sequential/test-http2-session-timeout.js @@ -36,7 +36,7 @@ server.listen(0, common.mustCall(() => { const diff = process.hrtime(startTime); const milliseconds = (diff[0] * 1e3 + diff[1] / 1e6); if (milliseconds < serverTimeout * 2) { - setImmediate(makeReq); + makeReq(); } else { server.removeListener('timeout', mustNotCall); server.close();