mirror of https://github.com/status-im/nim-eth.git
fix logic error
This commit is contained in:
parent
4fbb4603fc
commit
05bf76c537
|
@ -118,13 +118,12 @@ proc doPortMapping(tcpPort, udpPort: Port, description: string): Option[(Port, P
|
||||||
if cres.isErr:
|
if cres.isErr:
|
||||||
warn "UPnP port mapping check failed. Assuming the check itself is broken and the port mapping was done.", msg = cres.error
|
warn "UPnP port mapping check failed. Assuming the check itself is broken and the port mapping was done.", msg = cres.error
|
||||||
|
|
||||||
let extPort = Port(parseUInt(cres.value.externalPort))
|
debug "UPnP: added port mapping", externalPort = port, internalPort = port, protocol = protocol
|
||||||
debug "UPnP: added port mapping", externalPort = extPort, internalPort = port, protocol = protocol
|
|
||||||
case protocol:
|
case protocol:
|
||||||
of UPNPProtocol.TCP:
|
of UPNPProtocol.TCP:
|
||||||
extTcpPort = extPort
|
extTcpPort = port
|
||||||
of UPNPProtocol.UDP:
|
of UPNPProtocol.UDP:
|
||||||
extUdpPort = extPort
|
extUdpPort = port
|
||||||
elif strategy == NatPmp:
|
elif strategy == NatPmp:
|
||||||
for t in [(tcpPort, NatPmpProtocol.TCP), (udpPort, NatPmpProtocol.UDP)]:
|
for t in [(tcpPort, NatPmpProtocol.TCP), (udpPort, NatPmpProtocol.UDP)]:
|
||||||
let
|
let
|
||||||
|
|
Loading…
Reference in New Issue