When the ip4 addres is nil, it should try the next.
Signed-off-by: 黎咏 <s_xun_s@163.com>
This commit is contained in:
@@ -114,6 +114,9 @@ func IPv4() (net.IP, error) {
|
||||
}
|
||||
|
||||
ip := ipnet.IP.To4()
|
||||
if ip == nil {
|
||||
continue
|
||||
}
|
||||
return ip, nil
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user