mirror of
https://github.com/logos-storage/nim-libplum.git
synced 2026-07-24 00:03:11 +00:00
Merge acefbe424cf9d1f05f2d93533790c9ac4e034df8 into fa8aadb591e244b0af677aa88e23823a258bef45
This commit is contained in:
commit
b357430b6d
@ -6,6 +6,7 @@ author = "Status Research & Development GmbH"
|
||||
description = "Nim binding for libplum (PCP, NAT-PMP, UPnP-IGD port mapping)"
|
||||
license = "Apache License 2.0 or MIT"
|
||||
installDirs = @["libplum", "vendor"]
|
||||
installFiles = @["libplum_units.c"]
|
||||
|
||||
### Dependencies
|
||||
requires "nim >= 1.6.0",
|
||||
|
||||
@ -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