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