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
pull/24501/head
isaacs 2013-02-25 09:06:44 -08:00
parent f9a0140ef1
commit b0e7dbf2c0
1 changed files with 2 additions and 1 deletions

View File

@ -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();
}