Skip to content

Commit f213406

Browse files
santigimenoMyles Borins
authored and
Myles Borins
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. PR-URL: #3966 Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 2e92a1a commit f213406

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)