Update nat.go

This commit is contained in:
W192547975
2023-08-10 14:11:21 +08:00
committed by GitHub
parent 6af3f2fa7b
commit 0fd973a5d2

View File

@@ -123,7 +123,7 @@ func publicIPTest(publicIP string, echoPort int) (hasPublicIP int, hasUPNPorNATP
defer echoConn.Close()
go func() {
// close outside for breaking the ReadFromUDP
// wait 5s(30s?) for echo testing
// wait 30s for echo testing
buf := make([]byte, 1600)
echoConn.SetReadDeadline(time.Now().Add(time.Second * 30))
n, addr, err := echoConn.ReadFromUDP(buf)