fix: only update last_used_at when connection count > 0 (#10808)

This commit is contained in:
Jon Ayers
2023-11-21 18:10:41 -06:00
committed by GitHub
parent 782fe84c7c
commit 51b58cfc98
3 changed files with 45 additions and 13 deletions

View File

@ -573,6 +573,10 @@ type Stats struct {
Metrics []AgentMetric `json:"metrics"`
}
func (s Stats) SessionCount() int64 {
return s.SessionCountVSCode + s.SessionCountJetBrains + s.SessionCountReconnectingPTY + s.SessionCountSSH
}
type AgentMetricType string
const (