Azure / azure-sdk-for-js

This repository is for active development of the Azure SDK for JavaScript (NodeJS & Browser). For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/javascript/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-js.
MIT License
2.06k stars 1.19k forks source link

[@azure/communication-calling] MaxListenersExceededWarning after 11 calls #30310

Closed samueleiben closed 2 months ago

samueleiben commented 3 months ago

Describe the bug After starting 11 calls, the console shows the following warning:

MicrosoftTeamsAddOn.ts:242 MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 statusChanged listeners added. Use emitter.setMaxListeners() to increase limit
    at _addListener
    at EventEmitter.addListener
    at AudioEffectsStatusManager.on
    at AudioEffectsFeatureImpl.updateAudioEffectsStatusManager
    at AudioEffectsFeatureImpl.initialize
    at ExtensibleFeatureImpl.getApiObjectInstance
    at LocalAudioStream.feature
    at v.value
    at TeamsCallImpl._handleAudioEffectsOperations
    at TeamsCallImpl.startCallInternal

To Reproduce Steps to reproduce the behavior:

  1. Repeat the following two steps 11 times:
  2. Start a call using callAgent.startCall
  3. Accept the call and end it again.

Expected behavior No warning is shown in the console.

Additional information I am using two Microsoft Teams participants for the calls (instead of a Microsoft Teams participant and a phone number).

github-actions[bot] commented 3 months ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @acsdevx-msft.

samueleiben commented 2 months ago

This seems to have been fixed in 1.26.1