Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e3cfbba

Browse filesBrowse files
TrottBridgeAR
authored andcommitted
test: fix flaky test-http-server-keepalive-req-gc
Use `server` to keep the event loop open until the `ongc` listener runs. PR-URL: #29347 Fixes: #29344 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
1 parent 527f118 commit e3cfbba
Copy full SHA for e3cfbba

File tree

Expand file treeCollapse file tree

1 file changed

+1
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-3
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-http-server-keepalive-req-gc.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http-server-keepalive-req-gc.js
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if (common.isWindows) {
1616

1717
let client;
1818
const server = createServer(common.mustCall((req, res) => {
19-
onGC(req, { ongc: common.mustCall() });
19+
onGC(req, { ongc: common.mustCall(() => { server.close(); }) });
2020
req.resume();
2121
req.on('end', common.mustCall(() => {
2222
setImmediate(() => {
@@ -27,8 +27,6 @@ const server = createServer(common.mustCall((req, res) => {
2727
res.end('hello world');
2828
}));
2929

30-
server.unref();
31-
3230
server.listen(0, common.mustCall(() => {
3331
client = connect(server.address().port);
3432

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.