Clarifies: service -> ServiceRunning -> up -> ConnectionRunning -> connestablished ->connEstablished -> end of run -> connDone

This commit is contained in:
riccardom
2026-06-18 14:40:03 +02:00
parent 6465997a69
commit ff98105212
2 changed files with 22 additions and 20 deletions
+3 -3
View File
@@ -142,12 +142,12 @@ func (s *Server) restartEngineForMDMLocked() error {
_, cancel := context.WithCancel(s.rootCtx)
s.actCancel = cancel
s.clientRunningChan = make(chan struct{})
s.clientDoneChan = make(chan error, 1)
s.connectionEstablishedChan = make(chan struct{})
s.connectionDoneChan = make(chan error, 1)
log.Info("MDM restart: starting a fresh run with re-resolved config")
// MDM restart has no incoming RPC metadata; fire and forget (the supervisor
// reconnects internally and we don't block on the run).
s.connectClient.RunAsync(config, nil, s.clientRunningChan, s.clientDoneChan)
s.connectClient.RunAsync(config, nil, s.connectionEstablishedChan, s.connectionDoneChan)
s.publishConfigChangedEvent("mdm")
return nil
}