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
This leads to an endless loop if the network connection is explicitly dropped or a network connection is not possible for other reasons for a longer time. This unnecessary increases the battery usage #536.
To Reproduce
Steps to reproduce the behavior:
Drop network connection during sync.
Expected behavior
The sync should immediately stop if the connection is dropped explicitly (if this can be checked through the Android API) and stop after a few retries. Maybe it makes sense to combine it with an increasing retry delay.
Smartphone (please complete the following information):
It might not be an issue when happening while Element is in foreground because SyncThread is paused when switching to background. Though it is an issue when happening during background sync. #1915#1920
Describe the bug
When the network connection is lost during sync there's an endless loop in
SyncThread
. In this case the sync is retried until a connection is available again. Seehttps://github.com/vector-im/element-android/blob/1b9b18851d2389e41268a56229b8097e663c10b2/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/job/SyncThread.kt#L129
and following lines.
This leads to an endless loop if the network connection is explicitly dropped or a network connection is not possible for other reasons for a longer time. This unnecessary increases the battery usage #536.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The sync should immediately stop if the connection is dropped explicitly (if this can be checked through the Android API) and stop after a few retries. Maybe it makes sense to combine it with an increasing retry delay.
Smartphone (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: