diff --git a/lib/http.js b/lib/http.js index 0081432488f..212b8becb92 100644 --- a/lib/http.js +++ b/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(); }