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