Better naming and doc
This commit is contained in:
parent
301ab2af64
commit
7ad39fdc99
@ -69,7 +69,7 @@ class CommonTestHelper(context: Context) {
|
|||||||
MatrixConfiguration(
|
MatrixConfiguration(
|
||||||
applicationFlavor = "TestFlavor",
|
applicationFlavor = "TestFlavor",
|
||||||
roomDisplayNameFallbackProvider = TestRoomDisplayNameFallbackProvider(),
|
roomDisplayNameFallbackProvider = TestRoomDisplayNameFallbackProvider(),
|
||||||
defaultLongPoolTimeout = 5_000L
|
syncRequestTimeoutMillis = 5_000L
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -67,10 +67,11 @@ data class MatrixConfiguration(
|
|||||||
val threadMessagesEnabledDefault: Boolean = false,
|
val threadMessagesEnabledDefault: Boolean = false,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sync loop parameter: The maximum time to wait, in milliseconds, before returning this request.
|
* Server API configuration for the sync process:
|
||||||
|
* The maximum time to wait by the homeserver, in milliseconds, before returning the sync response.
|
||||||
* If no events (or other data) become available before this time elapses, the server will return a response with empty fields.
|
* If no events (or other data) become available before this time elapses, the server will return a response with empty fields.
|
||||||
*/
|
*/
|
||||||
val defaultLongPoolTimeout: Long = 30_000L,
|
val syncRequestTimeoutMillis: Long = 30_000L,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -181,7 +181,7 @@ internal class SyncThread @Inject constructor(private val syncTask: SyncTask,
|
|||||||
val timeout = when {
|
val timeout = when {
|
||||||
previousSyncResponseHasToDevice -> 0L /* Force timeout to 0 */
|
previousSyncResponseHasToDevice -> 0L /* Force timeout to 0 */
|
||||||
afterPause -> 0L /* No timeout after a pause */
|
afterPause -> 0L /* No timeout after a pause */
|
||||||
else -> matrixConfiguration.defaultLongPoolTimeout
|
else -> matrixConfiguration.syncRequestTimeoutMillis
|
||||||
}
|
}
|
||||||
Timber.tag(loggerTag.value).d("Execute sync request with timeout $timeout")
|
Timber.tag(loggerTag.value).d("Execute sync request with timeout $timeout")
|
||||||
val presence = lightweightSettingsStorage.getSyncPresenceStatus()
|
val presence = lightweightSettingsStorage.getSyncPresenceStatus()
|
||||||
|
Loading…
Reference in New Issue
Block a user