Fix geoip close

This commit is contained in:
世界 2024-01-01 21:36:06 +08:00
parent c506255e0f
commit 40c7f3e170
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4
2 changed files with 5 additions and 1 deletions

View File

@ -32,3 +32,7 @@ func (r *Reader) Lookup(addr netip.Addr) string {
}
return "unknown"
}
func (r *Reader) Close() error {
return r.reader.Close()
}

View File

@ -535,7 +535,7 @@ func (r *Router) Close() error {
}
if r.geoIPReader != nil {
r.logger.Trace("closing geoip reader")
err = E.Append(err, common.Close(r.geoIPReader), func(err error) error {
err = E.Append(err, r.geoIPReader.Close(), func(err error) error {
return E.Cause(err, "close geoip reader")
})
}