Skip to content

Commit 56add70

Browse files
committed
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.
1 parent 3297036 commit 56add70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/parallel/test-tls-multi-key.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ var server = tls.createServer(options, function(conn) {
3535
rejectUnauthorized: false
3636
}, function() {
3737
ciphers.push(rsa.getCipher());
38-
ecdsa.destroy();
39-
rsa.destroy();
38+
ecdsa.end();
39+
rsa.end();
4040
server.close();
4141
});
4242
});

0 commit comments

Comments
 (0)