summaryrefslogtreecommitdiff
path: root/test/parallel/test-child-process-fork-net2.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-child-process-fork-net2.js')
-rw-r--r--test/parallel/test-child-process-fork-net2.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-child-process-fork-net2.js b/test/parallel/test-child-process-fork-net2.js
index 45004041cc..454769b875 100644
--- a/test/parallel/test-child-process-fork-net2.js
+++ b/test/parallel/test-child-process-fork-net2.js
@@ -99,7 +99,7 @@ if (process.argv[2] === 'child') {
var j = count, client;
while (j--) {
- client = net.connect(common.PORT, '127.0.0.1');
+ client = net.connect(this.address().port, '127.0.0.1');
client.on('error', function() {
// This can happen if we kill the child too early.
// The client should still get a close event afterwards.
@@ -125,7 +125,7 @@ if (process.argv[2] === 'child') {
child3.kill();
}));
- server.listen(common.PORT, '127.0.0.1');
+ server.listen(0, '127.0.0.1');
var closeServer = function() {
server.close();