aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/server.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-02-13 18:38:34 +0800
committerFelix Lange <fjl@twurst.com>2015-02-13 18:39:32 +0800
commit170eb3ac684231dc2ddebc34e7006e0f2b5fc0c1 (patch)
tree01ccbe10fb2bfec738b3a3584f7999a01f9fbdd5 /p2p/server.go
parent82f0bd9009d8d577c86e800e9673a1972117113d (diff)
downloaddexon-170eb3ac684231dc2ddebc34e7006e0f2b5fc0c1.tar.gz
dexon-170eb3ac684231dc2ddebc34e7006e0f2b5fc0c1.tar.zst
dexon-170eb3ac684231dc2ddebc34e7006e0f2b5fc0c1.zip
p2p/discover: map listening port using configured mechanism
Diffstat (limited to 'p2p/server.go')
-rw-r--r--p2p/server.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/p2p/server.go b/p2p/server.go
index a0f2dee23..e44f3d7ab 100644
--- a/p2p/server.go
+++ b/p2p/server.go
@@ -182,7 +182,7 @@ func (srv *Server) Start() (err error) {
}
// dial stuff
- dt, err := discover.ListenUDP(srv.PrivateKey, srv.ListenAddr)
+ dt, err := discover.ListenUDP(srv.PrivateKey, srv.ListenAddr, srv.NAT)
if err != nil {
return err
}
@@ -194,7 +194,6 @@ func (srv *Server) Start() (err error) {
srv.loopWG.Add(1)
go srv.dialLoop()
}
-
if srv.NoDial && srv.ListenAddr == "" {
srvlog.Warnln("I will be kind-of useless, neither dialing nor listening.")
}