[management] fail on geo location init failure (#4362)

This commit is contained in:
Pascal Fischer
2025-08-18 10:53:55 +02:00
committed by GitHub
parent b3056d0937
commit 0e62325d46
2 changed files with 4 additions and 3 deletions

View File

@@ -24,11 +24,11 @@ func (s *BaseServer) GeoLocationManager() geolocation.Geolocation {
return Create(s, func() geolocation.Geolocation {
geo, err := geolocation.NewGeolocation(context.Background(), s.config.Datadir, !s.disableGeoliteUpdate)
if err != nil {
log.Warnf("could not initialize geolocation service. proceeding without geolocation support: %v", err)
} else {
log.Infof("geolocation service has been initialized from %s", s.config.Datadir)
log.Fatalf("could not initialize geolocation service: %v", err)
}
log.Infof("geolocation service has been initialized from %s", s.config.Datadir)
return geo
})
}

View File

@@ -90,6 +90,7 @@ func (s *BaseServer) Start(ctx context.Context) error {
s.errCh = make(chan error, 4)
s.PeersManager()
s.GeoLocationManager()
for _, fn := range s.afterInit {
if fn != nil {