Skip to content

Commit ccb50a7

Browse files
committed
add one missing self.destroyed check
1 parent fe11c69 commit ccb50a7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

server.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,7 @@ Server.prototype._onWebSocketRequest = function (socket, opts, params) {
545545
debug('got answer %s from %s', JSON.stringify(params.answer), params.peer_id)
546546

547547
self.getSwarm(params.info_hash, function (err, swarm) {
548+
if (self.destroyed) return
548549
if (err) return self.emit('warning', err)
549550
if (!swarm) {
550551
return self.emit('warning', new Error('no swarm with that `info_hash`'))

0 commit comments

Comments
 (0)