store active stats workers in list (#2690)
* store active stats workers in list * test * single node cleanup * cleanup * cleanup * cleanup
This commit is contained in:
@@ -163,10 +163,9 @@ func (t *telemetryService) ParticipantLeft(ctx context.Context,
|
||||
isConnected := false
|
||||
if worker, ok := t.getWorker(livekit.ParticipantID(participant.Sid)); ok {
|
||||
isConnected = worker.IsConnected()
|
||||
if worker.ClosedAt().IsZero() {
|
||||
if worker.Close() {
|
||||
prometheus.SubParticipant()
|
||||
}
|
||||
worker.Close()
|
||||
}
|
||||
|
||||
if isConnected && shouldSendEvent {
|
||||
|
||||
Reference in New Issue
Block a user