mirror of
https://github.com/logos-storage/nim-libplum.git
synced 2026-07-24 00:03:11 +00:00
fix: catch general exception
This commit is contained in:
parent
e6688ea79e
commit
acefbe424c
@ -243,10 +243,10 @@ proc createMapping*(
|
||||
try:
|
||||
# Wait for the signal's single fire (in mappingCallback)
|
||||
completed = await withTimeout(signal.wait(), timeout)
|
||||
except CancelledError:
|
||||
except CancelledError as e:
|
||||
# The signal was cancelled so it is safe to destroy and reclaim.
|
||||
await destroyAndReclaim(id, signal)
|
||||
raise
|
||||
raise e
|
||||
|
||||
if not completed:
|
||||
# The signal was not fired so it is safe to destroy and reclaim.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user