add a small delay service start self check

This commit is contained in:
Alex Paguis
2025-02-24 21:17:16 -05:00
committed by Cuong Manh Le
parent e60a92e93e
commit e68bfa795a

View File

@@ -462,6 +462,9 @@ NOTE: running "ctrld start" without any arguments will start already installed c
return return
} }
// add a small delay to ensure the service is started and did not crash
time.Sleep(1 * time.Second)
ok, status, err := selfCheckStatus(ctx, s, sockDir) ok, status, err := selfCheckStatus(ctx, s, sockDir)
switch { switch {
case ok && status == service.StatusRunning: case ok && status == service.StatusRunning: