修复IPv6访问可能导致进程异常退出的Bug

This commit is contained in:
GoEdgeLab
2021-08-01 09:20:07 +08:00
parent 19e03abf0b
commit 678e7f2c2a
2 changed files with 5 additions and 4 deletions

View File

@@ -165,7 +165,7 @@ Loop:
ip := ipString[atIndex+1:]
if iplibrary.SharedLibrary != nil {
result, err := iplibrary.SharedLibrary.Lookup(ip)
if err == nil {
if err == nil && result != nil {
this.cityMap[serverId+"@"+result.Country+"@"+result.Province+"@"+result.City] ++
if len(result.ISP) > 0 {