Kaynağa Gözat

fix: p2p and secret add bug

刘河 5 yıl önce
ebeveyn
işleme
2dc902fba1
1 değiştirilmiş dosya ile 3 ekleme ve 0 silme
  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
 	}