summaryrefslogtreecommitdiff
path: root/lib/tls.js
diff options
context:
space:
mode:
authorFedor Indutny <fedor.indutny@gmail.com>2013-03-15 22:49:31 +0400
committerFedor Indutny <fedor.indutny@gmail.com>2013-03-17 20:19:09 +0400
commitb5ddc0cf9658499e04c10b8e3158b81d2be0d5ac (patch)
tree94d4597dd950e8d18472f419be2f195dda66a5f3 /lib/tls.js
parenta0867e1c9395bc9c8af37c290f032bc8dbd847ce (diff)
downloadnodejs-b5ddc0cf9658499e04c10b8e3158b81d2be0d5ac.tar.gz
nodejs-b5ddc0cf9658499e04c10b8e3158b81d2be0d5ac.tar.bz2
nodejs-b5ddc0cf9658499e04c10b8e3158b81d2be0d5ac.zip
tls: write pending data of opposite side
Fix stucked CryptoStream behaviour, happening when one of the sides locks-up in queued state. fix #5023
Diffstat (limited to 'lib/tls.js')
-rw-r--r--lib/tls.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/tls.js b/lib/tls.js
index 515761410..ab80fb181 100644
--- a/lib/tls.js
+++ b/lib/tls.js
@@ -435,6 +435,7 @@ CryptoStream.prototype._read = function read(size) {
// Try writing pending data
if (this._pending !== null) this._writePending();
+ if (this._opposite._pending !== null) this._opposite._writePending();
if (bytesRead === 0) {
// EOF when cleartext has finished and we have nothing to read