diff --git a/restagent/restagent.go b/restagent/restagent.go index 9cea5bd4..e19543c0 100644 --- a/restagent/restagent.go +++ b/restagent/restagent.go @@ -201,13 +201,10 @@ func main() { if rest.IPv4 != "0.0.0.0" { // 默认启动localhost侦听 listenLocal := "127.0.0.1" + ":" + strconv.Itoa(int(rest.Port)) - listenv6Local := "[" + "::1" + "]" + ":" + strconv.Itoa(int(rest.Port)) if strings.ToLower(rest.Scheme) == "https" { go HttpListenTLS(listenLocal, rest.CaFile, rest.CertFile, rest.KeyFile, app) - go HttpListenTLS(listenv6Local, rest.CaFile, rest.CertFile, rest.KeyFile, app) } else { go HttpListen(listenLocal, app) - go HttpListen(listenv6Local, app) } } // ipv6 goroutines @@ -222,13 +219,10 @@ func main() { if rest.IPv6 != "::" { // 默认启动localhost侦听 - listenLocal := "127.0.0.1" + ":" + strconv.Itoa(int(rest.Port)) listenv6Local := "[" + "::1" + "]" + ":" + strconv.Itoa(int(rest.Port)) if strings.ToLower(rest.Scheme) == "https" { - go HttpListenTLS(listenLocal, rest.CaFile, rest.CertFile, rest.KeyFile, app) go HttpListenTLS(listenv6Local, rest.CaFile, rest.CertFile, rest.KeyFile, app) } else { - go HttpListen(listenLocal, app) go HttpListen(listenv6Local, app) } }