Skip to content

Commit

Permalink
test: fix handshake timeout test failing on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
nechaido committed Jul 21, 2017
1 parent 26e64dc commit 426d675
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/node/connection-handshake.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ test.test(
});

const port = server.address().port;
net.connect(port, (error) => {
test.assertNot(error, 'must connect to server');
server.getClients()[0].on('close', () => {
test.pass('connection must be closed');
});
const connection = net.connect(port, error =>
test.assertNot(error, 'must connect to server')
);
connection.on('close', () => {
test.pass('connection must be closed');
});
}
);

0 comments on commit 426d675

Please sign in to comment.