diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-09-07 02:31:34 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-09-07 02:31:34 -0700 |
| commit | 9fdf02bcdaacbf2b4fb95b927e111ef8271eb9e5 (patch) | |
| tree | 9899734ff9d719f5e5b226a3571648c03a277e2b | |
| parent | 889a39a24f43f8100a29cf6e6217928828dce5d0 (diff) | |
| download | seaweedfs-9fdf02bcdaacbf2b4fb95b927e111ef8271eb9e5.tar.xz seaweedfs-9fdf02bcdaacbf2b4fb95b927e111ef8271eb9e5.zip | |
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
| -rw-r--r-- | weed/util/network.go | 2 |
1 files changed, 1 insertions, 1 deletions
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() } } |
