Skip to content

Instantly share code, notes, and snippets.

@mranney
Created April 20, 2012 19:40
Show Gist options
  • Select an option

  • Save mranney/2431246 to your computer and use it in GitHub Desktop.

Select an option

Save mranney/2431246 to your computer and use it in GitHub Desktop.
diff --git a/lib/http.js b/lib/http.js
index f7109d7..6cc5473 100644
--- a/lib/http.js
+++ b/lib/http.js
@@ -1127,6 +1127,8 @@ ClientRequest.prototype.onSocket = function(socket) {
var freeParser = function() {
if (parser) {
+ // next line added by mjr to track down mystery parser exception
+ parser.socket.ondata = parser.socket.onend = null;
parsers.free(parser);
parser = null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment