Skip to content

Commit

Permalink
test: avoid connecting to :: in test-net-timeout
Browse files Browse the repository at this point in the history
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
1 parent 5cdbbdf commit 02c7991
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 02c7991

Please sign in to comment.