From 2dc902fba10a518919ffb2e48de0c844f5f1a0cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B2=B3?= Date: Fri, 6 Dec 2019 16:20:00 +0800 Subject: [PATCH] fix: p2p and secret add bug --- server/tool/utils.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/tool/utils.go b/server/tool/utils.go index 6a58bab..fb8fa55 100644 --- a/server/tool/utils.go +++ b/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 }