-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
Smacks keepalive ping #53
Comments
I just looked at the code and saw you already implemented this (smacks ping and regular ping if smacks isn't available and even whitespace ping if ping isn't available :) ) But: could you lower the ping timeout to 5 minutes? Currently it is set to 10 minutes, which is far too long for some mobile carriers here :( |
the rough 10 minute ping when in the background is an apple thing. I can probably add a setting to allow the user to adjust the ping when in the foreground but i suspect that will not do you a lot of good since it will likely disconnect eventually in the background. |
well, such a setting would at least prevent it to get disconnected when in foreground. |
This isn't exactly related, but Android 7.0+ is also moving to aggressively limit background data usage. I believe Google's recommended default setting is only allowing background apps to synchronize once every 15 minutes. It seems like it's probable that Apple has indeed limited it to no more than once every 10 minutes. |
That's not fully correct. See this for a good explanation: https://developer.android.com/training/monitoring-device-state/doze-standby.html In the emulator I observed Monal is successfully pinging every minute while in background. |
I think the smacks changes and the adoption of push should let us close this. |
Yes, I think so :) |
Currently Monal doesn't seem to do some sort of keepalive ping and I have to configure my prosody server to send out smacks pings (r-tags) after 7 minutes of inactivity to keep the connection alive.
If I don't do this my mobile carrier closes the TCP connection after some time (approximately 10-15 minutes) and Monal gets disconnected.
Sending an r-tag every 5 minutes or so (that is the interval Conversation uses for this) would solve this issue. For non-smacks sessions you could send a ping stanza to get the same result.
This could be connected to issue #3 I think.
The text was updated successfully, but these errors were encountered: