mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-04 14:33:09 +00:00
catch CancelledError in BlockExchange
This commit is contained in:
parent
b701e08a56
commit
46413c8dff
@ -716,6 +716,8 @@ proc blocksDeliveryHandler*(
|
||||
).errorOption:
|
||||
warn "Unable to store proof and cid for a block"
|
||||
continue
|
||||
except CancelledError:
|
||||
trace "Block delivery handling cancelled"
|
||||
except CatchableError as exc:
|
||||
warn "Error handling block delivery", error = exc.msg
|
||||
continue
|
||||
@ -963,6 +965,8 @@ proc blockexcTaskRunner(self: BlockExcEngine) {.async: (raises: []).} =
|
||||
while self.blockexcRunning:
|
||||
let peerCtx = await self.taskQueue.pop()
|
||||
await self.taskHandler(peerCtx)
|
||||
except CancelledError:
|
||||
trace "block exchange task runner cancelled", peer = peerCtx.id
|
||||
except CatchableError as exc:
|
||||
error "error running block exchange task", error = exc.msg
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user