aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-04-27 17:18:09 -0700
committerchrislu <chris.lu@gmail.com>2022-04-27 17:18:09 -0700
commitb2a6111090432088bd7691b7da629f92687492e0 (patch)
tree7a7e8e927b54cd6505e567a7c5a1d5b00c185b58
parentddec170bc9b5921c8b68f0f76310e42d45149337 (diff)
downloadseaweedfs-b2a6111090432088bd7691b7da629f92687492e0.tar.xz
seaweedfs-b2a6111090432088bd7691b7da629f92687492e0.zip
skip ipv6 all interfaces and localhost
fix https://github.com/chrislusf/seaweedfs/issues/2983
-rw-r--r--weed/util/net_timeout.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/util/net_timeout.go b/weed/util/net_timeout.go
index abb96c403..21aab30f8 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 != "" && host != "0.0.0.0" && host != "127.0.0.1" {
+ if host != "localhost" && host != "" && host != "0.0.0.0" && host != "127.0.0.1" && host != "[::]" && host != "[::1]" {
listner, err = net.Listen("tcp", JoinHostPort("localhost", port))
if err != nil {
return