#Add Listener for "Realtime got disconnected"?

9 messages · Page 1 of 1 (latest)

celest sleet
#

Is there a way to listen to the websocket open/close events for the realtime connection? I'm concerned that if my hybrid app is put into the background and the listener gets disconnected, I will miss the document updates that happened in the meantime. Is this something I need to handle, or is it already managed?

waxen arrow
celest sleet
#

Thank you. I guess I'm more interested in the general behavior of the disconnect though. To be concrete: when disconnected, will the events that happened during this time be replayed after the Realtime is connected again? Or will I miss out on them?

celest sleet
#

thank you. And a follow up to my initial question: in the Node SDK, I guess there's no way I can detect when the Websocket connection was closed, right? I would manually want to fetch the latest documents in that case to make sure the client is up-to-date

opal osprey
celest sleet
#

yes sorry my bad. I meant the appwrite package.

rare igloo
waxen arrow
# rare igloo Any idea by when we can expect see something rollout specifically for self hoste...

We are fixing 2 different things. I have create 2 PR's for adding a heartbeat to the websocket connection, so it doesnt get closed by inactivity using cloudflare for example:

These are simple to add, because there is no changes to public interfaces. However adding listeners needs more thought, because it needs to be present for all client sdk's and needs some planning.