mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-02 21:43:11 +00:00
fix(blockexchange): handle evicted peer in download retry loop
Part of https://github.com/codex-storage/nim-codex/issues/974 Signed-off-by: Chrysostomos Nanakos <chris@include.gr>
This commit is contained in:
parent
ad4d3b5d62
commit
ff7ac829c4
@ -375,7 +375,10 @@ proc downloadInternal(
|
||||
let peerId = self.pendingBlocks.getRequestPeer(address).get()
|
||||
self.peers.get(peerId)
|
||||
|
||||
assert not scheduledPeer.isNil
|
||||
if scheduledPeer.isNil:
|
||||
trace "Scheduled peer no longer available, clearing stale request", address
|
||||
self.pendingBlocks.clearRequest(address)
|
||||
continue
|
||||
|
||||
# Parks until either the block is received, or the peer times out.
|
||||
let activityTimer = scheduledPeer.activityTimer()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user