diff options
| author | chrislu <chris.lu@gmail.com> | 2022-03-17 16:54:29 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-03-17 16:54:29 -0700 |
| commit | f247cab5cd47b7f54a3267979508160ebdd933ce (patch) | |
| tree | 5d17eb59c1526b3ecfb3157558c81ea2ef862e39 /weed/util/net_timeout.go | |
| parent | 6886167d5f1403ac7e0b99e1061ab5d2470de52f (diff) | |
| download | seaweedfs-f247cab5cd47b7f54a3267979508160ebdd933ce.tar.xz seaweedfs-f247cab5cd47b7f54a3267979508160ebdd933ce.zip | |
skip localhost if bound to all interfaces already 0.0.0.0 or 127.0.0.1
Diffstat (limited to 'weed/util/net_timeout.go')
| -rw-r--r-- | weed/util/net_timeout.go | 2 |
1 files changed, 1 insertions, 1 deletions
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 |
