Browse Source

http: Do not free the wrong parser on socket close

This appears to fix #4673.  That bug is very hard to reproduce, so it's
hard to tell for certain, but this approach is more correct anyway.

Hat-tip: @dougwilson
v0.8.21-release
isaacs 12 years ago
parent
commit
b0e7dbf2c0
  1. 3
      lib/http.js

3
lib/http.js

@ -1788,7 +1788,8 @@ function connectionListener(socket) {
function serverSocketCloseListener() {
debug('server socket close');
// mark this parser as reusable
freeParser(parser);
if (this.parser)
freeParser(this.parser);
abortIncoming();
}

Loading…
Cancel
Save