p2p/tracker: only reschedule wake if previous didn't run
This commit is contained in:
parent
55043eec45
commit
ff3535e8e0
@ -188,9 +188,10 @@ func (t *Tracker) Fulfil(peer string, version uint, code uint64, id uint64) {
|
||||
t.expire.Remove(req.expire)
|
||||
delete(t.pending, id)
|
||||
if req.expire.Prev() == nil {
|
||||
t.wake.Stop()
|
||||
if t.wake.Stop() {
|
||||
t.schedule()
|
||||
}
|
||||
}
|
||||
g := fmt.Sprintf("%s/%s/%d/%#02x", trackedGaugeName, t.protocol, req.version, req.reqCode)
|
||||
metrics.GetOrRegisterGauge(g, nil).Dec(1)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user