aboutsummaryrefslogtreecommitdiffstats
path: root/p2p
diff options
context:
space:
mode:
authorken10100147 <sunhongping@kanjian.com>2016-09-28 18:11:58 +0800
committerFelix Lange <fjl@twurst.com>2016-09-28 18:11:58 +0800
commitafecb93e2e6b8350ca9fe8c93e5e32b4c3c7b857 (patch)
tree5ead9e0edaafca15ebb7f5896ad703da27e47130 /p2p
parent437c3863f1917762e7f7474bd8b5c7ad78714d9c (diff)
downloaddexon-afecb93e2e6b8350ca9fe8c93e5e32b4c3c7b857.tar.gz
dexon-afecb93e2e6b8350ca9fe8c93e5e32b4c3c7b857.tar.zst
dexon-afecb93e2e6b8350ca9fe8c93e5e32b4c3c7b857.zip
p2p/nat: fix parameter order for AddMapping
Diffstat (limited to 'p2p')
-rw-r--r--p2p/nat/nat.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/p2p/nat/nat.go b/p2p/nat/nat.go
index 505a1fc77..377dc406b 100644
--- a/p2p/nat/nat.go
+++ b/p2p/nat/nat.go
@@ -105,7 +105,7 @@ func Map(m Interface, c chan struct{}, protocol string, extport, intport int, na
glog.V(logger.Debug).Infof("deleting port mapping: %s %d -> %d (%s) using %s\n", protocol, extport, intport, name, m)
m.DeleteMapping(protocol, extport, intport)
}()
- if err := m.AddMapping(protocol, intport, extport, name, mapTimeout); err != nil {
+ if err := m.AddMapping(protocol, extport, intport, name, mapTimeout); err != nil {
glog.V(logger.Debug).Infof("network port %s:%d could not be mapped: %v\n", protocol, intport, err)
} else {
glog.V(logger.Info).Infof("mapped network port %s:%d -> %d (%s) using %s\n", protocol, extport, intport, name, m)
@@ -118,7 +118,7 @@ func Map(m Interface, c chan struct{}, protocol string, extport, intport int, na
}
case <-refresh.C:
glog.V(logger.Detail).Infof("refresh port mapping %s:%d -> %d (%s) using %s\n", protocol, extport, intport, name, m)
- if err := m.AddMapping(protocol, intport, extport, name, mapTimeout); err != nil {
+ if err := m.AddMapping(protocol, extport, intport, name, mapTimeout); err != nil {
glog.V(logger.Debug).Infof("network port %s:%d could not be mapped: %v\n", protocol, intport, err)
}
refresh.Reset(mapUpdateInterval)