Skip to content

Instantly share code, notes, and snippets.

@isaacs
Created March 20, 2013 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isaacs/5208810 to your computer and use it in GitHub Desktop.
Save isaacs/5208810 to your computer and use it in GitHub Desktop.
diff --git a/lib/tls.js b/lib/tls.js
index ab80fb1..d238fe0 100644
--- a/lib/tls.js
+++ b/lib/tls.js
@@ -651,7 +651,7 @@ function CleartextStream(pair, options) {
self._reading = false;
},
readStart: function() {
- if (self._reading) return;
+ if (self._reading && self._readableState.length) return;
self._reading = true;
self.read(0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment