mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 11:11:30 -04:00
Handle generated errors in broker
This commit is contained in:
parent
ed3d42e1ec
commit
3cfceb3755
4 changed files with 39 additions and 22 deletions
|
@ -120,7 +120,6 @@ func (m *Metrics) UpdateCountryStats(addr string) {
|
|||
m.countryStats.counts[country]++
|
||||
m.countryStats.addrs[addr] = true
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (m *Metrics) LoadGeoipDatabases(geoipDB string, geoip6DB string) error {
|
||||
|
@ -132,19 +131,16 @@ func (m *Metrics) LoadGeoipDatabases(geoipDB string, geoip6DB string) error {
|
|||
if err != nil {
|
||||
m.tablev4 = nil
|
||||
return err
|
||||
} else {
|
||||
m.tablev4 = tablev4
|
||||
}
|
||||
m.tablev4 = tablev4
|
||||
|
||||
tablev6 := new(GeoIPv6Table)
|
||||
err = GeoIPLoadFile(tablev6, geoip6DB)
|
||||
if err != nil {
|
||||
m.tablev6 = nil
|
||||
return err
|
||||
} else {
|
||||
m.tablev6 = tablev6
|
||||
}
|
||||
|
||||
m.tablev6 = tablev6
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue