Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
  • Loading branch information
gibfahn committed Jul 18, 2016
commit 02c7991907994ea163db86243eccab5538044556
4 changes: 2 additions & 2 deletions test/gc/test-net-timeout.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'use strict';
const common = require('../common');
// just like test/gc/http-client-timeout.js,
// but using a net server/client instead

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

const net = require('net');
const weak = require('weak');
require('../common');
const assert = require('assert');
const todo = 500;
let done = 0;
Expand All @@ -29,7 +29,7 @@ let countGC = 0;
console.log('We should do ' + todo + ' requests');

var server = net.createServer(serverHandler);
server.listen(0, getall);
server.listen(0, common.localhostIPv4, getall);

function getall() {
if (count >= todo)
Expand Down