diff options
author | Santiago Gimeno <santiago.gimeno@ionide.es> | 2015-11-22 15:12:17 +0100 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2016-01-18 08:01:57 -0800 |
commit | e65f1f7954fb364ab70063cdb374603c82f58385 (patch) | |
tree | ed958a7b06ac90fb18be4684ae8141407aebf35e | |
parent | ad63d350d4a4fe51547bf36a529631a746f3b1f8 (diff) | |
download | android-node-v8-e65f1f7954fb364ab70063cdb374603c82f58385.tar.gz android-node-v8-e65f1f7954fb364ab70063cdb374603c82f58385.tar.bz2 android-node-v8-e65f1f7954fb364ab70063cdb374603c82f58385.zip |
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 <fedor.indutny@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
-rw-r--r-- | test/parallel/test-tls-multi-key.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-tls-multi-key.js b/test/parallel/test-tls-multi-key.js index 4c9fb4285f..17b409f284 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(); }); }); |