This commit is contained in:
TenderIronh
2022-02-10 23:20:16 +08:00
parent 133fe046f8
commit b54fa2c6be
18 changed files with 32 additions and 22 deletions
-6
View File
@@ -10,7 +10,6 @@ import (
"math/rand"
"net"
"net/url"
"os"
"strings"
"sync"
"time"
@@ -361,11 +360,6 @@ func (pn *P2PNetwork) init() error {
gLog.Println(LevelINFO, "init start")
var err error
for {
pn.config.hostName, err = os.Hostname()
if err != nil {
break
}
// detect nat type
pn.config.publicIP, pn.config.natType, err = getNATType(pn.config.ServerHost, pn.config.UDPPort1, pn.config.UDPPort2)
// TODO rm test s2s