Skip to content

Commit

Permalink
Do not try to remove listener from an undefined connection
Browse files Browse the repository at this point in the history
See issue #325
  • Loading branch information
Sandro Santilli committed Sep 17, 2012
1 parent 0d98e5b commit c32f0bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ Request.prototype.start = function () {
self.emit('drain')
})
self.on('end', function() {
self.req.connection.removeListener('error', self._parserErrorHandler)
if ( self.req.connection ) self.req.connection.removeListener('error', self._parserErrorHandler)
})
self.emit('request', self.req)
}
Expand Down

0 comments on commit c32f0bb

Please sign in to comment.