Back

[SOLVED] Losing Realtime connection after switching WiFi on/off

  • 0
  • Flutter
  • Realtime
memoonlite
30 Jun, 2023, 07:34

Hello, everyone!

I'm using Flutter + Appwrite + Realtime. My Realtime instance listens to changes made to a particular Collection. This works fine.

Now I have the following situation: Realtime stops listening to changes in the collection after WiFi was switch on/off. It doesn't automatically recover. Creating a new instance of Realtime makes it working again (after closing/cancelling the current instance first).

I was wondering, is it normal behaviour that Realtime stops working after disconnecting Internet connectivity? And what's the best practice in such situation? Are we supposed to keep track of connection status manually and create a new instance every time the user disconnects/reconnects WiFi?

Thanks for reading!

TL;DR
After switching WiFi on/off, the Realtime connection stops working and needs to be manually reset by creating a new instance of Realtime. This is normal behavior, and the recommended solution is to resubscribe to the Realtime instance after reconnecting to the internet.
Drake
30 Jun, 2023, 16:41

Yes, this is expected. You might want to resubscribe after connecting to the internet again.

memoonlite
3 Jul, 2023, 17:18

Thanks! πŸ‘

Guille
3 Jul, 2023, 17:24

[SOLVED] Losing Realtime connection after switching WiFi on/off

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more