test: use reserved IP in test-net-connect-timeout
Use reserved IP in test-net-connect-timeout.js rather than arbitrary IP. PR-URL: https://github.com/nodejs/node/pull/2257 Fixes: https://github.com/nodejs/node/issues/2469 Reviewed By: Ben Noordhuis <ben@strongloop.com>
This commit is contained in:
parent
f3c3b23d55
commit
ae8d436623
@ -15,9 +15,11 @@ var gotConnect = false;
|
|||||||
|
|
||||||
var T = 100;
|
var T = 100;
|
||||||
|
|
||||||
|
// 192.0.2.1 is part of subnet assigned as "TEST-NET" in RFC 5737.
|
||||||
// 240.*.*.*.* is "reserved for future use"
|
// For use solely in documentation and example source code.
|
||||||
var socket = net.createConnection(9999, '240.0.0.0');
|
// 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);
|
socket.setTimeout(T);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user