tracker: Remove impossible code for 'completed' event
This commit is contained in:
parent
ac04761e40
commit
b6c1b3838b
1 changed files with 1 additions and 8 deletions
|
@ -230,20 +230,13 @@ func (tkr *Tracker) handlePeerEvent(ann *models.Announce, p *models.Peer) (snatc
|
||||||
}
|
}
|
||||||
|
|
||||||
case ann.Event == "completed":
|
case ann.Event == "completed":
|
||||||
v4seed := t.Seeders.Contains(p.Key())
|
|
||||||
v6seed := t.Seeders.Contains(p.Key())
|
|
||||||
|
|
||||||
if t.Leechers.Contains(p.Key()) {
|
if t.Leechers.Contains(p.Key()) {
|
||||||
err = tkr.leecherFinished(t, p)
|
err = tkr.leecherFinished(t, p)
|
||||||
} else {
|
} else {
|
||||||
err = models.ErrBadRequest
|
err = models.ErrBadRequest
|
||||||
}
|
}
|
||||||
|
|
||||||
// If one of the dual-stacked peers is already a seeder, they have
|
|
||||||
// already snatched.
|
|
||||||
if !(v4seed || v6seed) {
|
|
||||||
snatched = true
|
snatched = true
|
||||||
}
|
|
||||||
|
|
||||||
case t.Leechers.Contains(p.Key()) && ann.Left == 0:
|
case t.Leechers.Contains(p.Key()) && ann.Left == 0:
|
||||||
// A leecher completed but the event was never received.
|
// A leecher completed but the event was never received.
|
||||||
|
|
Loading…
Reference in a new issue