IsRunning V0

This commit is contained in:
riccardom
2026-06-16 18:55:08 +02:00
parent a6d504633f
commit a45cefe57a
2 changed files with 16 additions and 0 deletions
+9
View File
@@ -465,6 +465,15 @@ func parseRelayInfo(loginResp *mgmProto.LoginResponse) ([]string, *hmac.Token) {
return relayCfg.GetUrls(), token
}
// IsRunning reports whether a client run is currently in flight. It is the
// single source of truth for "is the client running", owned by the supervisor.
func (c *ConnectClient) IsRunning() bool {
if c == nil || c.sup == nil {
return false
}
return c.sup.running.Load()
}
func (c *ConnectClient) Engine() *Engine {
if c == nil {
return nil