diff --git a/src/app/plugins/call/CallControl.ts b/src/app/plugins/call/CallControl.ts index da734785c..c37efc26b 100644 --- a/src/app/plugins/call/CallControl.ts +++ b/src/app/plugins/call/CallControl.ts @@ -91,6 +91,13 @@ export class CallControl extends EventEmitter implements CallControlState { constructor(state: CallControlState, call: ClientWidgetApi, iframe: HTMLIFrameElement) { 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.call = call;