mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2025-01-18 20:21:36 +00:00
add one missing self.destroyed check
This commit is contained in:
parent
fe11c695cb
commit
ccb50a7ee9
@ -545,6 +545,7 @@ Server.prototype._onWebSocketRequest = function (socket, opts, params) {
|
||||
debug('got answer %s from %s', JSON.stringify(params.answer), params.peer_id)
|
||||
|
||||
self.getSwarm(params.info_hash, function (err, swarm) {
|
||||
if (self.destroyed) return
|
||||
if (err) return self.emit('warning', err)
|
||||
if (!swarm) {
|
||||
return self.emit('warning', new Error('no swarm with that `info_hash`'))
|
||||
|
Loading…
Reference in New Issue
Block a user