Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Correct way to cleanup lccs state for Connect/Disconnect functionality

Avatar

Level 2

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

Level 2

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