mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-23 01:45:52 +03:00
Do not loop sync in case of JsonEncodingException (if HS is down)
This commit is contained in:
parent
d2e1aff453
commit
5dca31e6f9
1 changed files with 3 additions and 1 deletions
|
@ -16,6 +16,7 @@
|
|||
|
||||
package im.vector.matrix.android.internal.session.sync.job
|
||||
|
||||
import com.squareup.moshi.JsonEncodingException
|
||||
import im.vector.matrix.android.api.MatrixCallback
|
||||
import im.vector.matrix.android.api.failure.Failure
|
||||
import im.vector.matrix.android.api.util.Cancelable
|
||||
|
@ -118,7 +119,8 @@ internal class SyncThread(private val syncTask: SyncTask,
|
|||
Timber.e(failure)
|
||||
}
|
||||
|
||||
if (failure !is Failure.NetworkConnection) {
|
||||
if (failure !is Failure.NetworkConnection
|
||||
|| failure.cause is JsonEncodingException) {
|
||||
// Wait 10s before retrying
|
||||
sleep(RETRY_WAIT_TIME_MS)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue