Since we ARE running there should be a config

If the config was cancelled midflight, connect will abort later on
This commit is contained in:
riccardom
2026-06-11 12:35:39 +02:00
parent 0206e318d1
commit 281f958554

View File

@@ -134,7 +134,7 @@ func (s *Server) restartEngineForMDMLocked() error {
if err != nil {
return fmt.Errorf("get active profile state: %w", err)
}
config, existingConfig, err := s.getConfig(activeProf)
config, _, err := s.getConfig(activeProf)
if err != nil {
return fmt.Errorf("get active profile config: %w", err)
}
@@ -151,12 +151,6 @@ func (s *Server) restartEngineForMDMLocked() error {
s.actCancel = nil
return nil
}
if !existingConfig {
log.Warn("MDM restart: config absent; not reconnecting")
state.Set(internal.StatusNeedsLogin)
s.actCancel = nil
return nil
}
ctx, cancel := context.WithCancel(s.rootCtx)
s.actCancel = cancel