mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-18 08:16:39 +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 {
|
return Create(s, func() geolocation.Geolocation {
|
||||||
geo, err := geolocation.NewGeolocation(context.Background(), s.config.Datadir, !s.disableGeoliteUpdate)
|
geo, err := geolocation.NewGeolocation(context.Background(), s.config.Datadir, !s.disableGeoliteUpdate)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Warnf("could not initialize geolocation service. proceeding without geolocation support: %v", err)
|
log.Fatalf("could not initialize geolocation service: %v", err)
|
||||||
} else {
|
|
||||||
log.Infof("geolocation service has been initialized from %s", s.config.Datadir)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Infof("geolocation service has been initialized from %s", s.config.Datadir)
|
||||||
|
|
||||||
return geo
|
return geo
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ func (s *BaseServer) Start(ctx context.Context) error {
|
|||||||
s.errCh = make(chan error, 4)
|
s.errCh = make(chan error, 4)
|
||||||
|
|
||||||
s.PeersManager()
|
s.PeersManager()
|
||||||
|
s.GeoLocationManager()
|
||||||
|
|
||||||
for _, fn := range s.afterInit {
|
for _, fn := range s.afterInit {
|
||||||
if fn != nil {
|
if fn != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user