Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Correct way to cleanup lccs state for Connect/Disconnect functionality

Avatar

Former Community Member

I am trying to implement connect/disconnect functionality but I got some errors - when user connects to another room after disconnect different objects(for example AudioPublisher) may end up in incorrect state. Currently I perform following sequence of actions on disconnect: call stop method on  AudioPublisher, call close method on AudioPublisher, and then call close method on ConnectionSession. When I reconnect again AudioPublisher object in wrong states and throws different exceptions("Stream not found", "Stream already exists"). Can you recommend some approach to avoid these errors?

Best Regards, Aleksey

2 Replies

Avatar

Employee

Hi Aleksey,

Seems like using multiple connectsession (connecting to different rooms) is messing your app. We handle most of the clean up in the close & stop methods for AudioPublisher. If you are still facing issues can you share your code.

Thanks

Arun

Avatar

Former Community Member

You are correct I am using multiple connection session. For now I solved the issues by creating new instances of ConnectionSession object and all required Publishers.

Best Regards, Aleksey