i am building a chat app but i notice if i leave chat app without using for a hour + realtime get disconnected and also if the user changes the IP then also realtime get disconnect whats the best method to check if realtime is working and reconnect it if not working.
When you listen to the stream, there's an onDone callback you can use to reconnect or whatever you want
ok let me check that
will on done get triggered if i call subscription.close() ?
I think so
if i switch ip ondone is not triggering when i switch back to same ip the message get delivered in realtime.
when i change internet ip and come back to same ip and try to post a data i am also hit with this error: AppwriteException (AppwriteException: general_argument_invalid, Invalid permissions
param: You can only provide up to 100 permissions. (400)) . what is this error ?
i am only give permission to 3 users to a document
maybe print the permissions before making the API call
what exactly is the real world use case for ip changing?
In chat if a customer is using broadband fiber connection if they loose a connection they get new ip when they reconnect
Wouldn't they disconnect from the internet so the web socket connection would close?
Not necessarily - some ISPs rotate customer IPs as often as twice a day.
for testing i switch between mobile network and broadband. when i switch realtime stop working. ondone or onerror no getting called. when i switch back realtime sometimes work and get all messages.
What version of the Appwrite SDK?
Appwrite 11.0.0 , when kept idle for a 4 hours realtime still works i think idle issue is fixed. But switching ip is the issue.
Soo is this not triggering on IP change?
Can you check if the onDone is being triggered?
Recommended threads
- Apple OAuth Scopes
Hi Hi, I've configured sign in with apple and this is the response i'm getting from apple once i've signed in. I cant find anywhere I set scopes. I remember se...
- Sign In With Apple OAuth Help
Hi All! I've got a flutter & appwrite app which Im trying to use sign in with apple for. I already have sign in with google working and the function is the sam...
- [SOLVED] OAuth With Google & Flutter
Hi all, I'm trying to sign in with google and it all goes swimmingly until the call back. I get a new user created on the appwrite dashboard however the flutte...