Does session.disconnect() cleanup bound events?


In the code below will session.disconnect() cleanup the bound events, both streamDestroyed and the signal:startSession or does this have to be handled manually by calling for each event?

Using v2.20.0

session.on('streamDestroyed', () => { ... });
session.on('signal:startSession', () => { ... });

It appears as though disconnect will handle cleanup of bound events, based on the documentation not cleaning them up, but I am unsure.

Sorry if this has been asked before, but I cannot find a clear answer in the documentation or within these forums.

Thanks in advance.

Method session.disconnect does NOT remove any event listener from the Session object.

Thank you for the quick response.

1 Like