treat unexpected 'completed' events as 'updated'

This commit is contained in:
Feross Aboukhadijeh 2017-02-02 17:26:03 -08:00
parent ed3da2f39b
commit 62dd0f7df2

View File

@ -82,8 +82,8 @@ Swarm.prototype._onAnnounceCompleted = function (params, peer, id) {
return this._onAnnounceStarted(params, peer, id) // treat as a start
}
if (peer.complete) {
debug('unexpected `completed` event from peer that is already marked as completed')
return // do nothing
debug('unexpected `completed` event from peer that is already completed')
return this._onAnnounceUpdate(params, peer, id) // treat as an update
}
this.complete += 1