Skip to content

Commit

Permalink
test: fix broken FreeBSD test
Browse files Browse the repository at this point in the history
Fixes net-server-max-connections-close-makes-more-available
Handles connection 'error' event so the test ends.

PR-URL: #1881
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Brendan Ashworth <[email protected]>
  • Loading branch information
santigimeno authored and brendanashworth committed Jun 3, 2015
1 parent 43a82f8 commit a804026
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ var createConnection = function(index) {
sent.push(msg);
});

connection.on('error', function(err) {
assert.equal(err.code, 'ECONNRESET');
resolve();
});

connection.on('data', function(e) {
console.error('connection ' + index + ' received response');
resolve();
Expand Down

0 comments on commit a804026

Please sign in to comment.