mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
tls: fix premature connection termination
Destroying the TLS session implies destroying the underlying socket but before this commit, that was done with net.Socket#destroy() rather than net.Socket#destroySoon(). The former closes the connection right away, even when there is still data to write. In other words, sometimes the final TLS record got truncated. Fixes #6107.
This commit is contained in:
parent
98c57c7c07
commit
9777890f5d
@ -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();
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user