Replace None with ?? in geolocation

This commit is contained in:
Torjus Håkestad 2021-09-30 23:12:27 +02:00
parent 6810202f3f
commit 5535a88fb1
2 changed files with 4 additions and 1 deletions

View File

@ -28,5 +28,8 @@ func (s *HoneypotServer) LookupCountry(ip net.IP) string {
s.Logger.Warnw("Error doing geoip lookup", "error", err) s.Logger.Warnw("Error doing geoip lookup", "error", err)
return "??" return "??"
} }
if record.Country.ISOCode == "None" {
return "??"
}
return record.Country.ISOCode return record.Country.ISOCode
} }

View File

@ -5,7 +5,7 @@ import (
"runtime" "runtime"
) )
var Version = "v0.1.10" var Version = "v0.1.11"
var Build string var Build string
func FullVersion() string { func FullVersion() string {