-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Randomly not working #129
Comments
Is the app open and active during this time? If the app is closed/backgrounded then it could be that the connection is terminated at the OS level, but the app is not active or permitted to run the necessary code to detect the connection state change, which is why there is no logging present. |
Thanks for your answer @benw-pusher ! I have no idea why, but today the connection seems to stay active a lot longer than usual (about 5h for now) |
Hi @fabiendeborde did you see the improved behaviour persist? |
Hey @benw-pusher , sorry I was extra busy at work... Sometimes when the app comes back from device sleep the connection is still active, sometimes it is not. To be sure I made a status badge (which is quite accurate), and a button next to it to reconnect when needed. I don't remember having to handle reconnection in the previous package, but the app was made about 2~3 years ago, so it might be OS related and not a problem from this library. I hope the feedback helped. |
Hello, I finally got it to work by using a single file as a hook at the top of my app.
I am monitoring the connection status as some people said it was randomly disconnecting, using the
onConnectionStateChange
method inpusher.init
, and so far it didn't disconnect...but, after some time it stops receiving events.My app is a one screen, always awake dashboard.
After about 30 minutes (i feel like the duration is pretty random), the app stops receiving events, but the
onConnectionStateChange
didn't change at all.I am logging the following:
but there is nothing to be logged...
Am I missing something during initialization ?
(I used to use the previous
pusher-js/react-native
and this never happened)The text was updated successfully, but these errors were encountered: