From 7706f578fecd94f36249255b7482e1b942520866 Mon Sep 17 00:00:00 2001 From: riccardom Date: Thu, 18 Jun 2026 19:25:55 +0200 Subject: [PATCH] use API --- client/internal/connect_lifecycle.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/internal/connect_lifecycle.go b/client/internal/connect_lifecycle.go index 7515563d2..2e890aacb 100644 --- a/client/internal/connect_lifecycle.go +++ b/client/internal/connect_lifecycle.go @@ -158,7 +158,7 @@ func (s *supervisor) handleStart(cmd lifecycleCmd) { } func (s *supervisor) handleStop(cmd lifecycleCmd) { - if s.curStart == nil { + if !s.isRunningInternal() { notify(cmd.done, nil) return } @@ -172,7 +172,7 @@ func (s *supervisor) handleStop(cmd lifecycleCmd) { // daemon-side lock — that is what an explicit restart (e.g. MDM config change) // needs to avoid a window where the client is observably stopped. func (s *supervisor) handleRestart(cmd lifecycleCmd) { - if s.curStart != nil { + if s.isRunningInternal() { s.stopCurrentRun() } s.handleStart(cmd)