UPnP: port mapping check no longer a show stopper

This commit is contained in:
Ștefan Talpalaru 2019-04-29 17:05:25 +02:00
parent ecc1a995aa
commit 20abba71d0
No known key found for this signature in database
GPG Key ID: CBF7934204F1B6F9
1 changed files with 9 additions and 10 deletions

View File

@ -116,9 +116,8 @@ proc doPortMapping(tcpPort, udpPort: Port, description: string): Option[(Port, P
let cres = upnp.getSpecificPortMapping(externalPort = $port, let cres = upnp.getSpecificPortMapping(externalPort = $port,
protocol = protocol) protocol = protocol)
if cres.isErr: if cres.isErr:
error "UPnP port mapping check", msg = cres.error warn "UPnP port mapping check failed. Assuming the check itself is broken and the port mapping was done.", msg = cres.error
return
else:
let extPort = Port(parseUInt(cres.value.externalPort)) let extPort = Port(parseUInt(cres.value.externalPort))
debug "UPnP: added port mapping", externalPort = extPort, internalPort = port, protocol = protocol debug "UPnP: added port mapping", externalPort = extPort, internalPort = port, protocol = protocol
case protocol: case protocol: