diff --git a/lib/tls.js b/lib/tls.js index fe94a5121f..dcdd99a193 100644 --- a/lib/tls.js +++ b/lib/tls.js @@ -1400,7 +1400,7 @@ function pipe(pair, socket) { // Encrypted should be unpiped from socket to prevent possible // write after destroy. pair.encrypted.unpipe(socket); - socket.destroy(); + socket.destroySoon(); }); });