From f247cab5cd47b7f54a3267979508160ebdd933ce Mon Sep 17 00:00:00 2001 From: chrislu Date: Thu, 17 Mar 2022 16:54:29 -0700 Subject: [PATCH] skip localhost if bound to all interfaces already 0.0.0.0 or 127.0.0.1 --- weed/util/net_timeout.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/util/net_timeout.go b/weed/util/net_timeout.go index 7b59a081c..abb96c403 100644 --- a/weed/util/net_timeout.go +++ b/weed/util/net_timeout.go @@ -109,7 +109,7 @@ func NewIpAndLocalListeners(host string, port int, timeout time.Duration) (ipLis WriteTimeout: timeout, } - if host != "localhost" && host != "" { + if host != "localhost" && host != "" && host != "0.0.0.0" && host != "127.0.0.1" { listner, err = net.Listen("tcp", JoinHostPort("localhost", port)) if err != nil { return