fix: geosite of nameserver-policy cannot be loaded correctly

This commit is contained in:
metacubex 2023-03-18 22:33:39 +08:00
parent f6f02bb5eb
commit 9316c1293e

View file

@ -92,6 +92,10 @@ type geoSiteFilter struct {
} }
func NewGeoSite(group string) (fallbackDomainFilter, error) { func NewGeoSite(group string) (fallbackDomainFilter, error) {
if err := geodata.InitGeoSite(); err != nil {
log.Errorln("can't initial GeoSite: %s", err)
return nil, err
}
matcher, _, err := geodata.LoadGeoSiteMatcher(group) matcher, _, err := geodata.LoadGeoSiteMatcher(group)
if err != nil { if err != nil {
return nil, err return nil, err