From f21340657512c9e223dae9c8333993ffc55ea047 Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Sun, 22 Nov 2015 15:12:17 +0100 Subject: [PATCH] test: fix tls-multi-key race condition 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. PR-URL: https://github.com/nodejs/node/pull/3966 Reviewed-By: Fedor Indutny Reviewed-By: James M Snell --- test/parallel/test-tls-multi-key.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-tls-multi-key.js b/test/parallel/test-tls-multi-key.js index 4c9fb4285f6ddb..17b409f284dcba 100644 --- a/test/parallel/test-tls-multi-key.js +++ b/test/parallel/test-tls-multi-key.js @@ -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(); }); });