Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup
  • Loading branch information
Trott committed Dec 1, 2015
commit d9ceff6aeda3c2202d869328eac3c588348e4ee6
10 changes: 5 additions & 5 deletions test/parallel/test-net-socket-local-address.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ server.on('close', common.mustCall(function() {
server.listen(common.PORT, common.localhostIPv4, testConnect);

function testConnect() {
if (conns === 2) {
return server.close();
}
// If both server and client callbacks have fired...
// If we're not waiting for a server or client callback to fire...
if (serverRemotePorts.length === clientLocalPorts.length) {
// ...then proceed.
if (conns === 2) {
return server.close();
}
client.connect(common.PORT, common.localhostIPv4, function() {
clientLocalPorts.push(this.localPort);
this.once('close', testConnect);
this.destroy();
});
conns++;
}
conns++;
}