fix: update mmdb fail

This commit is contained in:
Larvan2
2024-02-21 21:56:20 +08:00
parent 3d833ef6a8
commit f8295a02fd
2 changed files with 9 additions and 1 deletions

View File

@@ -57,7 +57,7 @@ func Verify() bool {
func Instance() Reader {
once.Do(func() {
mmdbPath := C.Path.MMDB()
log.Debugln("Load MMDB file: %s", mmdbPath)
log.Infoln("Load MMDB file: %s", mmdbPath)
mmdb, err := maxminddb.Open(mmdbPath)
if err != nil {
log.Fatalln("Can't load MMDB: %s", err.Error())
@@ -94,3 +94,7 @@ func DownloadMMDB(path string) (err error) {
return err
}
func Reload() {
once = sync.Once{}
}