good morning!!!!

Skip to content
Snippets Groups Projects
Commit d54e3539 authored by Darrel Herbst's avatar Darrel Herbst Committed by Felix Lange
Browse files

p2p/nat: delete port mapping before adding (#15222)

Fixes #1024
parent 5df0b240
No related branches found
No related tags found
No related merge requests found
......@@ -62,6 +62,7 @@ func (n *upnp) AddMapping(protocol string, extport, intport int, desc string, li
}
protocol = strings.ToUpper(protocol)
lifetimeS := uint32(lifetime / time.Second)
n.DeleteMapping(protocol, extport, intport)
return n.client.AddPortMapping("", uint16(extport), protocol, uint16(intport), ip.String(), true, desc, lifetimeS)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment