p2p/server: add UDP port mapping goroutine to wait group (#20846)
This commit is contained in:
parent
1e2e1b41f8
commit
bf35e27ea7
@ -562,7 +562,11 @@ func (srv *Server) setupDiscovery() error {
|
||||
srv.log.Debug("UDP listener up", "addr", realaddr)
|
||||
if srv.NAT != nil {
|
||||
if !realaddr.IP.IsLoopback() {
|
||||
go nat.Map(srv.NAT, srv.quit, "udp", realaddr.Port, realaddr.Port, "ethereum discovery")
|
||||
srv.loopWG.Add(1)
|
||||
go func() {
|
||||
nat.Map(srv.NAT, srv.quit, "udp", realaddr.Port, realaddr.Port, "ethereum discovery")
|
||||
srv.loopWG.Done()
|
||||
}()
|
||||
}
|
||||
}
|
||||
srv.localnode.SetFallbackUDP(realaddr.Port)
|
||||
|
Loading…
Reference in New Issue
Block a user