if server.close() is called, end http response object

This commit is contained in:
Feross Aboukhadijeh 2015-08-24 00:11:21 +02:00
parent c0f84f9610
commit d29367a4a0

View File

@ -221,7 +221,7 @@ Server.prototype.onHttpRequest = function (req, res, opts) {
'failure reason': err.message 'failure reason': err.message
} }
} }
if (self.destroyed) return if (self.destroyed) return res.end()
delete response.action // only needed for UDP encoding delete response.action // only needed for UDP encoding
res.end(bencode.encode(response)) res.end(bencode.encode(response))