Explorar o código

p2p/tracker: properly clean up fulfilled requests

Martin Holst Swende %!s(int64=4) %!d(string=hai) anos
pai
achega
45fca44c24
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      p2p/tracker/tracker.go

+ 1 - 0
p2p/tracker/tracker.go

@@ -186,6 +186,7 @@ func (t *Tracker) Fulfil(peer string, version uint, code uint64, id uint64) {
 	}
 	// Everything matches, mark the request serviced and meter it
 	t.expire.Remove(req.expire)
+	delete(t.pending, id)
 	if req.expire.Prev() == nil {
 		t.wake.Stop()
 		t.schedule()