We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fbb695f commit 254ffccCopy full SHA for 254ffcc
codex/blockexchange/engine/engine.nim
@@ -375,7 +375,11 @@ proc downloadInternal(
375
let peerId = self.pendingBlocks.getRequestPeer(address).get()
376
self.peers.get(peerId)
377
378
- assert not scheduledPeer.isNil
+ # Handle case where scheduled peer was evicted/disconnected
379
+ if scheduledPeer.isNil:
380
+ trace "Scheduled peer no longer available, clearing stale request", address
381
+ self.pendingBlocks.clearRequest(address)
382
+ continue
383
384
# Parks until either the block is received, or the peer times out.
385
let activityTimer = scheduledPeer.activityTimer()
0 commit comments