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>
This commit is contained in:
parent
ad63d350d4
commit
e65f1f7954
@ -35,8 +35,8 @@ var server = tls.createServer(options, function(conn) {
|
|||||||
rejectUnauthorized: false
|
rejectUnauthorized: false
|
||||||
}, function() {
|
}, function() {
|
||||||
ciphers.push(rsa.getCipher());
|
ciphers.push(rsa.getCipher());
|
||||||
ecdsa.destroy();
|
ecdsa.end();
|
||||||
rsa.destroy();
|
rsa.end();
|
||||||
server.close();
|
server.close();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user