fix(calls): lift CallControl's listener limit so ended calls can be freed (#316) #379

Merged
jared merged 1 commits from fix/call-listener-limit into lotus 2026-10-17 21:19:13 -04:00
Showing only changes of commit 46d6570df3 - Show all commits
+7
View File
@@ -91,6 +91,13 @@ export class CallControl extends EventEmitter implements CallControlState {
constructor(state: CallControlState, call: ClientWidgetApi, iframe: HTMLIFrameElement) { constructor(state: CallControlState, call: ClientWidgetApi, iframe: HTMLIFrameElement) {
super(); super();
// [Gitea #316] More than 10 call features subscribe to state_update at once
// (call bar, controls, hotkeys, AFK, muted-talk, join/leave sounds,
// announcements, rejoin, policy toast, glance, desktop thumbbar/SMTC …).
// Hitting the default limit logged a MaxListenersExceededWarning, and the
// console then kept this CallControl — and through it the whole Element Call
// document — alive: ~11 MB leaked per call. These are not leaks, so lift it.
this.setMaxListeners(100);
this.state = state; this.state = state;
this.call = call; this.call = call;