Explorar o código

fix: p2p and secret add bug

刘河 %!s(int64=5) %!d(string=hai) anos
pai
achega
2dc902fba1
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      server/tool/utils.go

+ 3 - 0
server/tool/utils.go

@@ -31,6 +31,9 @@ func InitAllowPort() {
 }
 
 func TestServerPort(p int, m string) (b bool) {
+	if m == "p2p" || m == "secret" {
+		return true
+	}
 	if p > 65535 || p < 0 {
 		return false
 	}