Skip to content

Commit 3b3cd1f

Browse files
committed
test: do not race server.close with timeout
Refs: nodejs#43680
1 parent ad07a13 commit 3b3cd1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/parallel/test-http-client-response-timeout.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ server.listen(common.mustCall(() => {
99
http.get({ port: server.address().port }, common.mustCall((res) => {
1010
res.on('timeout', common.mustCall(() => req.destroy()));
1111
res.setTimeout(1);
12-
server.close();
12+
setTimeout(common.mustCall(() => server.close()), 2);
1313
}));
1414
}));

0 commit comments

Comments
 (0)