mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-28 09:17:35 +00:00
p2p/discover: fix waiting wrong duration (#35002)
The timer should wait the remaining time, not the elapsed time.
This commit is contained in:
parent
7c9032dff6
commit
e5ff3596db
1 changed files with 1 additions and 1 deletions
|
|
@ -250,7 +250,7 @@ func (it *lookupIterator) slowdown() {
|
||||||
if diff > minInterval {
|
if diff > minInterval {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
wait := time.NewTimer(diff)
|
wait := time.NewTimer(minInterval - diff)
|
||||||
defer wait.Stop()
|
defer wait.Stop()
|
||||||
select {
|
select {
|
||||||
case <-wait.C:
|
case <-wait.C:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue