diff --git a/core/nat.go b/core/nat.go index 6fe4d07..55c1480 100644 --- a/core/nat.go +++ b/core/nat.go @@ -113,7 +113,6 @@ func getNATType(host string, udp1 int, udp2 int) (publicIP string, NATType int, func publicIPTest(publicIP string, echoPort int) (hasPublicIP int, hasUPNPorNATPMP int) { var echoConn *net.UDPConn - //This piece is in another goroutine in the old code! Please check the update diary. gLog.Println(LvDEBUG, "echo server start") var err error echoConn, err = net.ListenUDP("udp", &net.UDPAddr{IP: net.IPv4zero, Port: echoPort}) @@ -125,7 +124,6 @@ func publicIPTest(publicIP string, echoPort int) (hasPublicIP int, hasUPNPorNATP go func() { // close outside for breaking the ReadFromUDP // wait 5s(30s?) for echo testing - gLog.Println(LvDEBUG, "the own goroutine of echo server run") buf := make([]byte, 1600) echoConn.SetReadDeadline(time.Now().Add(time.Second * 30)) n, addr, err := echoConn.ReadFromUDP(buf)