Compare commits

...

2 Commits

Author SHA1 Message Date
zu1k
36d199a200 fix country name is none 2020-08-16 12:45:51 +08:00
zu1k
7b74ed4419 fix proxy checker goroutine leak 2020-08-16 12:41:31 +08:00
2 changed files with 2 additions and 1 deletions

View File

@@ -68,7 +68,7 @@ func CrawlGo() {
num := len(proxies)
for i := 0; i < num; i++ {
country, err := GeoIp.Find(proxies[i].BaseInfo().Server)
if err != nil {
if err != nil || country == "" {
country = "Earth"
}
proxies[i].SetName(fmt.Sprintf("%s_%d_%s", ProjectName, i+1, country))

View File

@@ -68,6 +68,7 @@ func checkProxyWithChan(p Proxy, c chan checkResult) {
name: p.Identifier(),
delay: 0,
}
return
}
c <- checkResult{
name: p.Identifier(),