mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2025-01-19 04:31:36 +00:00
ws tracker: don't crash with filter function
This commit is contained in:
parent
2abab6c653
commit
5dcdf9c4c1
@ -325,10 +325,13 @@ Server.prototype._onWebSocketRequest = function (socket, params) {
|
||||
|
||||
self._onRequest(params, function (err, response) {
|
||||
if (err) {
|
||||
socket.send(JSON.stringify({
|
||||
'failure reason': err.message,
|
||||
info_hash: common.hexToBinary(params.info_hash)
|
||||
}), socket.onSend)
|
||||
|
||||
self.emit('warning', err)
|
||||
response = {
|
||||
'failure reason': err.message
|
||||
}
|
||||
return
|
||||
}
|
||||
if (self.destroyed) return
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user