You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.
When setting the syncDelay to a custom value, the sync timeout parameter is no longer set to desired value.
Description
When building a default session, like below: session = MXSession.Builder(hsConfig!!, dataHandler, context).build(); session?.startEventStream(null);
The sync requests are made expected, with the default timeout value (after the first sync): https://mybaseurl/_matrix/client/r0/sync?filter=%7B%7D&set_presence=offline&timeout=0 https://mybaseurl/_matrix/client/r0/sync?filter=1&set_presence=offline&timeout=30000&since=s94606_169438_162_1_1_1_1_22183_1
When building a session with custom syncDelay: session = MXSession.Builder(hsConfig!!, dataHandler, context).build(); session?.syncDelay = 20000; session?.startEventStream(null);
The sync requests now are sending the parameter timeout with value 0 all the time (not only for first sync): https://mybaseurl/_matrix/client/r0/sync?filter=%7B%7D&set_presence=offline&timeout=0 https://mybaseurl/_matrix/client/r0/sync?filter=1&set_presence=offline&timeout=0&since=s94605_169415_162_1_1_1_1_22182_1
Moreover, if the syncTimeout is set: session?.syncTimeout = 10000
the timeout param in the request still remains the default one: https://mybaseurl/_matrix/client/r0/sync?filter=1&set_presence=offline&timeout=30000&since=s94606_169438_162_1_1_1_1_22183_1
Additional information
Matrix-Android-Sdk version: v0.9.35
Android Studio version: 4.0.0
The text was updated successfully, but these errors were encountered:
Actually, I can see that the server long poll timeout will always be set to at least 30 seconds:
private static final int DEFAULT_SERVER_TIMEOUT_MS = 30000;
/**
* Update the long poll timeout.
*
* @param ms the timeout in ms
*/
public void setServerLongPollTimeout(int ms) {
mDefaultServerTimeoutms = Math.max(ms, DEFAULT_SERVER_TIMEOUT_MS);
Log.d(LOG_TAG, "setServerLongPollTimeout : " + mDefaultServerTimeoutms);
}
Is there any plan to extend the functionality to support lower timeout values as well?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When setting the syncDelay to a custom value, the sync timeout parameter is no longer set to desired value.
Description
session = MXSession.Builder(hsConfig!!, dataHandler, context).build(); session?.startEventStream(null);
The sync requests are made expected, with the default timeout value (after the first sync):
https://mybaseurl/_matrix/client/r0/sync?filter=%7B%7D&set_presence=offline&timeout=0 https://mybaseurl/_matrix/client/r0/sync?filter=1&set_presence=offline&timeout=30000&since=s94606_169438_162_1_1_1_1_22183_1
session = MXSession.Builder(hsConfig!!, dataHandler, context).build(); session?.syncDelay = 20000; session?.startEventStream(null);
The sync requests now are sending the parameter timeout with value 0 all the time (not only for first sync):
https://mybaseurl/_matrix/client/r0/sync?filter=%7B%7D&set_presence=offline&timeout=0 https://mybaseurl/_matrix/client/r0/sync?filter=1&set_presence=offline&timeout=0&since=s94605_169415_162_1_1_1_1_22182_1
session?.syncTimeout = 10000
the timeout param in the request still remains the default one:
https://mybaseurl/_matrix/client/r0/sync?filter=1&set_presence=offline&timeout=30000&since=s94606_169438_162_1_1_1_1_22183_1
Additional information
Matrix-Android-Sdk version: v0.9.35
Android Studio version: 4.0.0
The text was updated successfully, but these errors were encountered: