summaryrefslogtreecommitdiff
path: root/test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js')
-rw-r--r--test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js b/test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js
index a26b548385..8670c3c2b6 100644
--- a/test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js
+++ b/test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js
@@ -31,7 +31,7 @@ const server = net.createServer(function onClient(client) {
}
});
-server.listen(common.PORT, common.localhostIPv4, function() {
+server.listen(0, common.localhostIPv4, function() {
var nbClientsEnded = 0;
function addEndedClient(client) {
@@ -41,9 +41,9 @@ server.listen(common.PORT, common.localhostIPv4, function() {
}
}
- const client1 = net.connect({ port: common.PORT });
+ const client1 = net.connect({ port: this.address().port });
client1.on('end', addEndedClient);
- const client2 = net.connect({ port: common.PORT });
+ const client2 = net.connect({ port: this.address().port });
client2.on('end', addEndedClient);
});