Skip to content

Commit

Permalink
test: use reserved IP in test-net-connect-timeout
Browse files Browse the repository at this point in the history
Use reserved IP in test-net-connect-timeout.js rather than arbitrary
IP.

PR-URL: #2257
Fixes: #2469
Reviewed By: Ben Noordhuis <[email protected]>
  • Loading branch information
Trott committed Aug 23, 2015
1 parent f3c3b23 commit ae8d436
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/internet/test-net-connect-timeout.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ var gotConnect = false;

var T = 100;


// 240.*.*.*.* is "reserved for future use"
var socket = net.createConnection(9999, '240.0.0.0');
// 192.0.2.1 is part of subnet assigned as "TEST-NET" in RFC 5737.
// For use solely in documentation and example source code.
// In short, it should be unreachable.
// In practice, it's a network black hole.
var socket = net.createConnection(9999, '192.0.2.1');

socket.setTimeout(T);

Expand Down

0 comments on commit ae8d436

Please sign in to comment.