mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2025-02-07 05:49:05 +00:00
treat unexpected 'completed' events as 'updated'
This commit is contained in:
parent
ed3da2f39b
commit
62dd0f7df2
@ -82,8 +82,8 @@ Swarm.prototype._onAnnounceCompleted = function (params, peer, id) {
|
|||||||
return this._onAnnounceStarted(params, peer, id) // treat as a start
|
return this._onAnnounceStarted(params, peer, id) // treat as a start
|
||||||
}
|
}
|
||||||
if (peer.complete) {
|
if (peer.complete) {
|
||||||
debug('unexpected `completed` event from peer that is already marked as completed')
|
debug('unexpected `completed` event from peer that is already completed')
|
||||||
return // do nothing
|
return this._onAnnounceUpdate(params, peer, id) // treat as an update
|
||||||
}
|
}
|
||||||
|
|
||||||
this.complete += 1
|
this.complete += 1
|
||||||
|
Loading…
Reference in New Issue
Block a user