Skip to content

Commit 536c3d0

Browse files
Trottrvagg
authored andcommitted
test: use reserved IP in test-net-connect-timeout
Use reserved IP in test-net-connect-timeout.js rather than arbitrary IP. PR-URL: #2257 Fixes: #2469 Reviewed By: Ben Noordhuis <[email protected]>
1 parent 09437e0 commit 536c3d0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/internet/test-net-connect-timeout.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ var gotConnect = false;
1515

1616
var T = 100;
1717

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

2224
socket.setTimeout(T);
2325

0 commit comments

Comments
 (0)