-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Enable and Disable ping/pong #699
Comments
Hello @anishlg, thank you very much for opening this issue! What do you think is the better approach? I am in favour of adding the possibility to reactivate the lost connection detection with the setter rather then adding an additional method. Could you also provide a simple application for me since I haven't done any android app. Thank you very much! Best regards, |
@marci4 , Best regards, |
Hello @anish, THANKS. |
@marci4 , Regards, |
Hello @anishlg, I wrote the code and did not have this use case in mind (since this library is designed for java in the first place). Best regards, |
Any idea when this will be available? |
This issue is already in the master! Closing it! |
Expected Behavior
The ping/pong is enabled to identify the lost connection. For connection to work properly in Android mobile sleep mode, we should be able to disable ping/pong in sleep mode and enable it back again when device wakes up.
Current Behavior
In Android mobile goes to sleep mode, when we disable ping/pong using setConnectionLostTimeout(0). It works fine. But when we enable ping/pong (when device wakes up) using setConnectionLostTimeout(30), it does not work. When we checked, we find that the timer is destroyed on setConnectionLostTimeout(0). We expect it to be created and set on setConnectionLostTimeout(30). But it does not happen. Because of this, we don't have any method of enabling ping/pong once it is disabled.
Expected Solution
Currently disabling the ping/pong by setConnectionLostTimeout(0) is working. Library has to make the necessary changes to ensure ping/pong is enabled back when setConnectionLostTimeout(30) is called.
(or) If Library adds 2 separate methods to enable and disable ping/pong, that will be even better.
.
Steps to Reproduce (for bugs)
Debug log (for bugs)
Context
Your Environment
The text was updated successfully, but these errors were encountered: