Skip to content

Commit

Permalink
test: listen on and connect to 127.0.0.1
Browse files Browse the repository at this point in the history
Avoid transient DNS issues in test sequential/test-net-GH-5504 by using
the IP address instead of the 'localhost' host name.

Fixes: #6611
PR-URL: #7524
Reviewed-By: Brian White <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
  • Loading branch information
bnoordhuis authored and Myles Borins committed Jul 14, 2016
1 parent 0a85987 commit 7d6acef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/sequential/test-net-GH-5504.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ function server() {
console.error('_socketEnd');
});
socket.write(content);
}).listen(common.PORT, function() {
}).listen(common.PORT, common.localhostIPv4, function() {
console.log('listening');
});
}

function client() {
var net = require('net');
var client = net.connect({
host: 'localhost',
host: common.localhostIPv4,
port: common.PORT
}, function() {
client.destroy();
Expand Down

0 comments on commit 7d6acef

Please sign in to comment.