Update nat.go

Fix fixing bug
This commit is contained in:
W192547975
2023-08-03 21:51:38 +08:00
committed by GitHub
parent 0864ddc6a7
commit bce7b2cb0a

View File

@@ -121,6 +121,8 @@ func publicIPTest(publicIP string, echoPort int) (hasPublicIP int, hasUPNPorNATP
echoConn, err = net.ListenUDP("udp", &net.UDPAddr{IP: net.IPv4zero, Port: echoPort})
if err != nil {
gLog.Println(LvERROR, "echo server listen error:", err)
wg.Done()
return
}
wg.Done()
// close outside for breaking the ReadFromUDP