Skip to content

Commit 02c7991

Browse files
committed
test: avoid connecting to :: in test-net-timeout
This test tries to connect to :: or 0.0.0.0, which resolves to localhost on some platforms but not others. Change to specify localhost.
1 parent 5cdbbdf commit 02c7991

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/gc/test-net-timeout.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
'use strict';
2+
const common = require('../common');
23
// just like test/gc/http-client-timeout.js,
34
// but using a net server/client instead
45

@@ -19,7 +20,6 @@ function serverHandler(sock) {
1920

2021
const net = require('net');
2122
const weak = require('weak');
22-
require('../common');
2323
const assert = require('assert');
2424
const todo = 500;
2525
let done = 0;
@@ -29,7 +29,7 @@ let countGC = 0;
2929
console.log('We should do ' + todo + ' requests');
3030

3131
var server = net.createServer(serverHandler);
32-
server.listen(0, getall);
32+
server.listen(0, common.localhostIPv4, getall);
3333

3434
function getall() {
3535
if (count >= todo)

0 commit comments

Comments
 (0)