Back

Realtime interferes with Connectivity Plus?

  • 0
  • Self Hosted
  • Flutter
  • Realtime
mav8rick
1 Apr, 2024, 17:47

On 1.3.7

I am using the Flutter package connectivity_plus: ^6.0.1

I can get it working real well initially - it "auto detects" if there is an internect connection without having to poll it and then it will "automagically" make a callback if there are changes to the network.

Now, my real purpose for using it is to get an initial signal if connectivity has changed and then check if a realtime connection is still intact (be it trying to write to part of the document to trigger the message updates or something else).

The strange thing is that once I initiate that realtime connection, doing connect/disconnect no longer triggers Connectivity Plus.

As for the realtime connection, I'm 100% sure I got it working (could receive updates to a document) but turning off the network doesn't trigger any onError or onDone callback. It doesn't trigger even after I remove Connectivity Plus.

How do I reliably and efficiently handle network disconnects in the case of the realtime connection?

TL;DR
The developer is experiencing an issue where the Connectivity Plus package stops triggering after initiating a realtime connection. The realtime connection is not detecting network disconnects as expected. **Solution:** This issue likely occurs because the realtime connection might be managing its own network status independently. To address this, the developer should implement additional network monitoring within their code specifically for the realtime connection to handle disconnects effectively.
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