diff --git a/qqwry.go b/qqwry.go index cd734a0..fff5026 100644 --- a/qqwry.go +++ b/qqwry.go @@ -183,9 +183,6 @@ func QueryIPIpdb(ip string) (location *Location, err error) { return } location = SplitResult(ret[0], ret[1], ip) - if location.Country == "局域网" { - location.ISP = location.Country - } locationCache.Store(ip, location) return location, nil } @@ -231,5 +228,8 @@ func SplitResult(addr string, isp string, ipv4 string) (location *Location) { location.District = splitList[i] } } + if location.Country == "局域网" { + location.ISP = location.Country + } return }