Skip to content
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

publish a notification when the state transitions to disconnecting #206

Open
topliceanu opened this issue Mar 10, 2016 · 2 comments
Open

Comments

@topliceanu
Copy link
Contributor

Clients need to react to the library changing state to disconnecting as opposed to waiting for the state to transition into disconnected (this transition takes a long time and the interval is not configurable).

@lukeredpath
Copy link
Contributor

@topliceanu hi, can I just try and clarify your use case here...I'm pretty certain that the only time that the connection state transitions from connected => disconnecting => disconnected is when you explicitly call disconnect on the client. In this case it should be trivial enough for you to handle this transition in your own code (start reacting after calling disconnect and wait for the delegate callback to inform you that it has disconnected).

In all other cases of disconnection or connection failure the library should transition immediately to disconnected. Are you not seeing this? What interval are you referring to and what specifically is taking a long time?

@topliceanu
Copy link
Contributor Author

@lukeredpath sorry for the confusion, let me try to explain the issue again. I need a way to figure out when the library detects a lost connection, ie. switches from connected to disconnecting. I'm guessing libPusher can do it without me calling .disconnect(), for instance, when it does not receive a reply to a ping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants