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 <rtrott@gmail.com>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
  • 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.
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.