mirror of https://github.com/go-redis/redis.git
Do not assume that all non-IP hosts are loopbacks
This commit is contained in:
parent
00d98485f8
commit
e059f9fbf8
|
@ -691,7 +691,7 @@ func replaceLoopbackHost(nodeAddr, originHost string) string {
|
|||
func isLoopback(host string) bool {
|
||||
ip := net.ParseIP(host)
|
||||
if ip == nil {
|
||||
return true
|
||||
return false
|
||||
}
|
||||
return ip.IsLoopback()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue