only set tunnel address if advertise is blank

This commit is contained in:
Asim Aslam 2019-09-18 19:04:22 +01:00
parent 05e62a2b95
commit 6222bc2a1e

View File

@ -716,7 +716,11 @@ func (n *network) Connect() error {
}
// set our internal node address
n.node.address = n.Tunnel.Address()
// if advertise address is not set
if len(n.options.Advertise) == 0 {
n.node.address = n.Tunnel.Address()
n.server.Init(server.Advertise(n.Tunnel.Address()))
}
// initialize the tunnel to resolved nodes
n.Tunnel.Init(