fix: catch general exception

This commit is contained in:
Gabriel Cruz 2026-07-13 13:28:57 -03:00
parent e6688ea79e
commit acefbe424c
No known key found for this signature in database
GPG Key ID: 3C6977037D5A1EF5

View File

@ -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.