mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-16 03:42:21 +08:00
Fix geoip close
This commit is contained in:
parent
c506255e0f
commit
40c7f3e170
|
@ -32,3 +32,7 @@ func (r *Reader) Lookup(addr netip.Addr) string {
|
||||||
}
|
}
|
||||||
return "unknown"
|
return "unknown"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (r *Reader) Close() error {
|
||||||
|
return r.reader.Close()
|
||||||
|
}
|
||||||
|
|
|
@ -535,7 +535,7 @@ func (r *Router) Close() error {
|
||||||
}
|
}
|
||||||
if r.geoIPReader != nil {
|
if r.geoIPReader != nil {
|
||||||
r.logger.Trace("closing geoip reader")
|
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")
|
return E.Cause(err, "close geoip reader")
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user