From 9fdf02bcdaacbf2b4fb95b927e111ef8271eb9e5 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 7 Sep 2021 02:31:34 -0700 Subject: [PATCH] remove detecting ipv6 Got this error on my local: transport: Error while dialing dial tcp [fe80::1]:19333: connect: no route to host related to https://github.com/chrislusf/seaweedfs/pull/2310 --- weed/util/network.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/util/network.go b/weed/util/network.go index a3ea82330..55a123667 100644 --- a/weed/util/network.go +++ b/weed/util/network.go @@ -24,7 +24,7 @@ func DetectedHostAddress() string { for _, a := range addrs { if ipNet, ok := a.(*net.IPNet); ok && !ipNet.IP.IsLoopback() { - if ipNet.IP.To4() != nil || ipNet.IP.To16() != nil { + if ipNet.IP.To4() != nil { return ipNet.IP.String() } }