mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-16 07:16:38 +00:00
[management] fail on geo location init failure (#4362)
This commit is contained in:
@@ -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
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user