diff options
author | Rich Trott <rtrott@gmail.com> | 2015-07-27 17:10:47 -0700 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2015-08-23 14:30:01 -0700 |
commit | ae8d436623109f315229ca9cc05715af362257b0 (patch) | |
tree | 64d9e8fb06f54c86259129d4d5d32830365d2729 /test/internet/test-net-connect-timeout.js | |
parent | f3c3b23d55fc3b21aecc88471063580245226ee3 (diff) | |
download | android-node-v8-ae8d436623109f315229ca9cc05715af362257b0.tar.gz android-node-v8-ae8d436623109f315229ca9cc05715af362257b0.tar.bz2 android-node-v8-ae8d436623109f315229ca9cc05715af362257b0.zip |
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>
Diffstat (limited to 'test/internet/test-net-connect-timeout.js')
-rw-r--r-- | test/internet/test-net-connect-timeout.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/internet/test-net-connect-timeout.js b/test/internet/test-net-connect-timeout.js index 436d773182..b92d234852 100644 --- a/test/internet/test-net-connect-timeout.js +++ b/test/internet/test-net-connect-timeout.js @@ -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); |