Skip to content
Closed
Changes from all commits
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
12 changes: 6 additions & 6 deletions test/parallel/test-net-socket-local-address.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ const server = net.createServer(function(socket) {

const client = new net.Socket();

server.on('close', common.mustCall(function() {
assert.deepEqual(clientLocalPorts, serverRemotePorts,
'client and server should agree on the ports used');
assert.equal(2, conns);
}));

server.listen(common.PORT, common.localhostIPv4, testConnect);

function testConnect() {
Expand All @@ -44,3 +38,9 @@ function testConnect() {
});
conns++;
}

process.on('exit', function() {
assert.deepEqual(clientLocalPorts, serverRemotePorts,
'client and server should agree on the ports used');
assert.equal(2, conns);
});