diff --git a/pkg/monitor/myip.go b/pkg/monitor/myip.go index 64b6c31..e72180b 100644 --- a/pkg/monitor/myip.go +++ b/pkg/monitor/myip.go @@ -45,7 +45,7 @@ func UpdateIP(useIPv6CountryCode bool, period uint32) { CachedIP = fmt.Sprintf("%s/%s", ipv4, ipv6) } - if ipv6 != "" && useIPv6CountryCode { + if ipv6 != "" && (useIPv6CountryCode || ipv4 == "") { GeoQueryIP = ipv6 } else { GeoQueryIP = ipv4