diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2013-10-09 17:46:17 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2013-10-09 19:25:47 +0200 |
commit | 9777890f5d9ce95f15c64d29f1c0a55c12d24c3e (patch) | |
tree | cf6ddf06933d078830084bf1d5c1fe1d0898861c /lib | |
parent | 98c57c7c0724a3518f18a01a63fcc7bef2daf9f6 (diff) | |
download | node-new-9777890f5d9ce95f15c64d29f1c0a55c12d24c3e.tar.gz |
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tls.js | 2 |
1 files changed, 1 insertions, 1 deletions
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(); }); }); |