mirror of
https://github.com/logos-storage/bittorrent-tracker.git
synced 2026-01-08 07:53:08 +00:00
do not close socket even when it's not in other swarms
This commit is contained in:
parent
b2c2b8f0d0
commit
fe11c695cb
@ -29,15 +29,7 @@ function Swarm (infoHash, server) {
|
||||
peer_id: peer.peerId
|
||||
}
|
||||
self._onAnnounceStopped(params, peer, peer.peerId)
|
||||
|
||||
// When a websocket peer is evicted, and it's not in any other swarms, close
|
||||
// the websocket to conserve server resources.
|
||||
if (peer.socket && peer.socket.infoHashes.length === 0) {
|
||||
try {
|
||||
peer.socket.close()
|
||||
peer.socket = null
|
||||
} catch (err) {}
|
||||
}
|
||||
peer.socket = null
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user