mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-06-27 21:09:28 +00:00
Guard isSome
This commit is contained in:
parent
54d9d8c2db
commit
dcdc9d0450
@ -96,7 +96,8 @@ method mapNatPorts*(
|
||||
return none((Port, Port, MappingProtocol))
|
||||
|
||||
# If both mappings are still active, return the stored ports without recreating.
|
||||
if m.tcpMappingId.isSome and m.hasLiveMapping(m.tcpMappingId.get) and
|
||||
if m.activeTcpPort.isSome and m.activeUdpPort.isSome and m.activeMappingProtocol.isSome and
|
||||
m.tcpMappingId.isSome and m.hasLiveMapping(m.tcpMappingId.get) and
|
||||
m.udpMappingId.isSome and m.hasLiveMapping(m.udpMappingId.get):
|
||||
return some((m.activeTcpPort.get, m.activeUdpPort.get, m.activeMappingProtocol.get))
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user