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
This commit is contained in:
@@ -24,7 +24,7 @@ func DetectedHostAddress() string {
|
|||||||
|
|
||||||
for _, a := range addrs {
|
for _, a := range addrs {
|
||||||
if ipNet, ok := a.(*net.IPNet); ok && !ipNet.IP.IsLoopback() {
|
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()
|
return ipNet.IP.String()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user