Skip to content

Commit d29367a

Browse files
committed
if server.close() is called, end http response object
1 parent c0f84f9 commit d29367a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ Server.prototype.onHttpRequest = function (req, res, opts) {
221221
'failure reason': err.message
222222
}
223223
}
224-
if (self.destroyed) return
224+
if (self.destroyed) return res.end()
225225

226226
delete response.action // only needed for UDP encoding
227227
res.end(bencode.encode(response))

0 commit comments

Comments
 (0)