From dcdc9d045052aef5d391a4d004a56b7c7f983d7c Mon Sep 17 00:00:00 2001 From: Arnaud Date: Tue, 16 Jun 2026 10:53:01 +0400 Subject: [PATCH] Guard isSome --- storage/nat.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/storage/nat.nim b/storage/nat.nim index 8dee4cd0..61a07955 100644 --- a/storage/nat.nim +++ b/storage/nat.nim @@ -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))