I'm facing an issue where if an user closes the realtime subscription, I am not able to set up a subscription again. It returns a null when i try to do so.
What would be the way to approach this?
Also, what would be the proper approach to re connect the realtime if an user loses an internet connection without restarting the app.
TL;DR
Issue: Null error occurs when trying to set up a new realtime subscription after the previous one is closed. Additionally, looking for a proper approach to reconnect realtime when an user loses internet connection without app restart.
Solution: When closing the realtime subscription, ensure that any necessary cleanup or resetting of variables is done to avoid null errors when setting up a new subscription. To reconnect realtime after an internet connection loss, implement a retry mechanism that automatically attempts to reconnect periodically until a successful connection is established.