mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
skip localhost if bound to all interfaces already 0.0.0.0 or 127.0.0.1
This commit is contained in:
parent
6886167d5f
commit
f247cab5cd
|
@ -109,7 +109,7 @@ func NewIpAndLocalListeners(host string, port int, timeout time.Duration) (ipLis
|
||||||
WriteTimeout: timeout,
|
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))
|
listner, err = net.Listen("tcp", JoinHostPort("localhost", port))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue