mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-19 11:20:45 +00:00
eth/downloader: remove the expired id directly (#17963)
This commit is contained in:
parent
5b74bb6445
commit
b35165555d
1 changed files with 3 additions and 4 deletions
|
|
@ -664,12 +664,11 @@ func (q *queue) expire(timeout time.Duration, pendPool map[string]*fetchRequest,
|
||||||
}
|
}
|
||||||
// Add the peer to the expiry report along the number of failed requests
|
// Add the peer to the expiry report along the number of failed requests
|
||||||
expiries[id] = len(request.Headers)
|
expiries[id] = len(request.Headers)
|
||||||
|
|
||||||
|
// Remove the expired requests from the pending pool directly
|
||||||
|
delete(pendPool, id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Remove the expired requests from the pending pool
|
|
||||||
for id := range expiries {
|
|
||||||
delete(pendPool, id)
|
|
||||||
}
|
|
||||||
return expiries
|
return expiries
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue