i have created a chat app. Realtime getting disconnect in few hours if user keep tab open. How to know if realtime is disconnected due to time out or closed using close() because ondone is triggered for both . i want to restart realtime connection if its closed because of time out.
TL;DR
Developers want to know how to differentiate between a real-time disconnection due to a timeout or if it was closed using close(). They are working on a chat app and the real-time connection disconnects after a few hours if the user leaves the tab open. The goal is to restart the real-time connection if it was closed due to a timeout.