mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 07:37:20 +00:00
p2p/tracker: fix head detection in Fulfil to avoid unnecessary timer reschedules (#33370)
This commit is contained in:
parent
1ce71a1895
commit
13a8798fa3
1 changed files with 2 additions and 1 deletions
|
|
@ -185,9 +185,10 @@ func (t *Tracker) Fulfil(peer string, version uint, code uint64, id uint64) {
|
|||
return
|
||||
}
|
||||
// Everything matches, mark the request serviced and meter it
|
||||
wasHead := req.expire.Prev() == nil
|
||||
t.expire.Remove(req.expire)
|
||||
delete(t.pending, id)
|
||||
if req.expire.Prev() == nil {
|
||||
if wasHead {
|
||||
if t.wake.Stop() {
|
||||
t.schedule()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue