Skip to content

Commit fb1f6fc

Browse files
authored
fix: flush rtc stats when reconnecting (#1946)
During reconnect, we could lose some pending stats as we aggressively stop the stats reporter. Now, before stopping, we attempt to flush the pending stats.
1 parent 26ca6bd commit fb1f6fc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/client/src/Call.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,6 +1288,7 @@ export class Call {
12881288
}
12891289

12901290
this.tracer.setEnabled(enableTracing);
1291+
this.sfuStatsReporter?.flush();
12911292
this.sfuStatsReporter?.stop();
12921293
if (statsOptions?.reporting_interval_ms > 0) {
12931294
this.sfuStatsReporter = new SfuStatsReporter(sfuClient, {

0 commit comments

Comments
 (0)