test: fix tls-multi-key race condition
authorSantiago Gimeno <santiago.gimeno@ionide.es>
Sun, 22 Nov 2015 14:12:17 +0000 (15:12 +0100)
committerMyles Borins <mborins@us.ibm.com>
Mon, 15 Feb 2016 19:30:23 +0000 (11:30 -0800)
commitf21340657512c9e223dae9c8333993ffc55ea047
tree93c610746a7769ccdc94006c1826fb8c98e8940a
parent2e92a1a6b44f7e461235934ddea9b4eeafe70b90
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>
test/parallel/test-tls-multi-key.js