We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a0a3297 commit 04e045fCopy full SHA for 04e045f
1 file changed
p2p/discover/v4_udp.go
@@ -453,14 +453,15 @@ func (t *UDPv4) loop() {
453
// Start the timer so it fires when the next pending reply has expired.
454
now := time.Now()
455
for p, el := range iterList[*replyMatcher](plist) {
456
+ nextTimeout = p
457
if dist := p.deadline.Sub(now); dist < 2*respTimeout {
458
timeout.Reset(dist)
459
return
460
}
461
// Remove pending replies whose deadline is too far in the
462
// future. These can occur if the system clock jumped
463
// backwards after the deadline was assigned.
- nextTimeout.errc <- errClockWarp
464
+ p.errc <- errClockWarp
465
plist.Remove(el)
466
467
nextTimeout = nil
0 commit comments