From 60238cce12d5c0c45c54c18033a439ac12429a29 Mon Sep 17 00:00:00 2001 From: isaacs Date: Tue, 19 Feb 2013 11:37:48 -0800 Subject: [PATCH] tls: Write pending data on socket drain Fixes #4800 --- lib/tls.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/tls.js b/lib/tls.js index 8b3654fa474..0c5b1a5c364 100644 --- a/lib/tls.js +++ b/lib/tls.js @@ -1306,6 +1306,10 @@ function pipe(pair, socket) { // its data from the cleartext side, we have to give it a // light kick to get in motion again. socket.on('drain', function() { + if (pair.encrypted._pending) + pair.encrypted._writePending(); + if (pair.cleartext._pending) + pair.cleartext._writePending(); pair.encrypted.read(0); pair.cleartext.read(0); });