-
Notifications
You must be signed in to change notification settings - Fork 143
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
Stop reconnecting #189
Comments
I agree it would be helpful to stop reconnecting attempts. My workaround has been to check for spurious connection when ConnectionState.CONNECTED and then invoke pusher.disconnect(). |
@jmanini I used the same workaround :) |
Still no improvement here? 😁 |
It seems that it still isn't implemented. According to Pusher.java:
Moreover, according to WebSocketConnection.java:
So basically there's a lack of opportunities to stop connection when conenctionState is other than ConnectionState.CONNECTED. |
What is the issue?
I am using this library in an Android app. My desired behavior when the app goes into background:
For disconnecting I use method:
So far it works fine if the connection state is
ConnectionState.CONNECTED
.However, if the connection state was
ConnectionState.CONNECTING
orConnectionState.RECONNECTING
, using thedisconnect()
method doesn't stop the pusher from attempting to connect. I also did not find any other way to stop attempting to reconnect without having to implement a workaround. It would be nice to have a functionality to do both of the steps I described directly with pusher.Is it a crash report?
Any improvements you suggest
...
CC @pusher/mobile
The text was updated successfully, but these errors were encountered: