From 45f39033ae769419c9746a0c08eee3e91074f5eb Mon Sep 17 00:00:00 2001 From: fkwp Date: Mon, 11 May 2026 18:50:34 +0200 Subject: [PATCH] Fix stale reconnect counts in CallEnded: cacheStartCall now resets the full cache --- src/analytics/PosthogEvents.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/analytics/PosthogEvents.ts b/src/analytics/PosthogEvents.ts index 9afe76a2..e8fcaad3 100644 --- a/src/analytics/PosthogEvents.ts +++ b/src/analytics/PosthogEvents.ts @@ -50,7 +50,17 @@ export class CallEndedTracker { }; public cacheStartCall(time: Date): void { - this.cache.startTime = time; + this.cache = { + startTime: time, + maxParticipantsCount: 0, + reconnectingCount: 0, + reconnectingCountByReason: { + syncing: 0, + membershipConnected: 0, + certainlyConnected: 0, + livekit: 0, + }, + }; } public cacheParticipantCountChanged(count: number): void {