Skip to content

Commit

Permalink
tls: Write pending data on socket drain
Browse files Browse the repository at this point in the history
Fixes #4800
  • Loading branch information
isaacs committed Feb 19, 2013
1 parent 7f30370 commit 60238cc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/tls.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down

0 comments on commit 60238cc

Please sign in to comment.