summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/http.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/http.js b/lib/http.js
index 0081432488..212b8becb9 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();
}