mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2025-01-18 20:21:36 +00:00
fix: announces only have one info_hash
This commit is contained in:
parent
36a4c2208a
commit
5020b538ce
@ -350,11 +350,9 @@ Server.prototype._onWebSocketRequest = function (socket, opts, params) {
|
||||
peers = response.peers
|
||||
delete response.peers
|
||||
|
||||
params.info_hash.forEach(function (info_hash) {
|
||||
if (socket.infoHashes.indexOf(info_hash) === -1) {
|
||||
socket.infoHashes.push(info_hash)
|
||||
}
|
||||
})
|
||||
if (socket.infoHashes.indexOf(params.info_hash) === -1) {
|
||||
socket.infoHashes.push(params.info_hash)
|
||||
}
|
||||
|
||||
response.info_hash = common.hexToBinary(params.info_hash)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user