Skip to content

Commit

Permalink
test: fix tls-multi-key race condition
Browse files Browse the repository at this point in the history
In some conditions it can happen that the client-side socket is
destroyed before the server-side socket has gracefully closed, thus
causing a 'ECONNRESET' error in this socket. To solve this, also close
gracefully in the client side.
  • Loading branch information
santigimeno committed Jan 15, 2016
1 parent 3297036 commit 56add70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-tls-multi-key.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ var server = tls.createServer(options, function(conn) {
rejectUnauthorized: false
}, function() {
ciphers.push(rsa.getCipher());
ecdsa.destroy();
rsa.destroy();
ecdsa.end();
rsa.end();
server.close();
});
});
Expand Down

0 comments on commit 56add70

Please sign in to comment.