diff --git a/VERSION b/VERSION index 32b12cc..6efdfbb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.63 +1.2.64 diff --git a/internal/crowdsec/service.go b/internal/crowdsec/service.go index fdb59af..805ccfa 100644 --- a/internal/crowdsec/service.go +++ b/internal/crowdsec/service.go @@ -172,8 +172,12 @@ func ServiceStatus(ctx context.Context) Status { st.Version = strings.TrimSpace(scanner.Text()) } } + } - // Best-effort counts — ignore errors (agent may be stopped). + // Only query cscli data endpoints when the agent is running — cscli + // hangs on its local socket when the agent is stopped, which would + // block the entire status response and leave the UI with no data. + if st.AgentRunning { if decisions, err := Decisions(ctx); err == nil { st.DecisionCount = len(decisions) }