When the ip4 addres is nil, it should try the next.

Signed-off-by: 黎咏 <s_xun_s@163.com>
This commit is contained in:
黎咏
2021-01-26 12:42:56 +08:00
parent 38eaa5cde0
commit cd4cbf1962

View File

@@ -114,6 +114,9 @@ func IPv4() (net.IP, error) {
}
ip := ipnet.IP.To4()
if ip == nil {
continue
}
return ip, nil
}