Skip to content

Commit

Permalink
Merge pull request #30 from Chia-Network/check-nil-ips
Browse files Browse the repository at this point in the history
Check nil ips
  • Loading branch information
cmmarslender authored Apr 21, 2022
2 parents 3fa77d0 + 871b3d6 commit afc4aab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/metrics/crawler.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ func (s *CrawlerServiceMetrics) StartIPCountryMapping(limit uint) {
})
if err != nil {
log.Printf("Error getting IPs: %s\n", err.Error())
return
}

s.GetIPsAfterTimestamp(ipsAfterTimestamp)
Expand All @@ -150,6 +151,10 @@ func (s *CrawlerServiceMetrics) GetIPsAfterTimestamp(ips *rpc.GetIPsAfterTimesta
return
}

if ips == nil {
return
}

type countStruct struct {
ISOCode string
Name string
Expand Down

0 comments on commit afc4aab

Please sign in to comment.