mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-18 20:29:10 +03:00
double checking the sync state in order to avoid redundant invalid token events
This commit is contained in:
parent
f61d20a7f8
commit
52731cf59d
1 changed files with 3 additions and 0 deletions
|
@ -160,6 +160,9 @@ internal class SyncThread @Inject constructor(private val syncTask: SyncTask,
|
|||
synchronized(lock) { lock.wait() }
|
||||
Timber.tag(loggerTag.value).d("...retry")
|
||||
} else if (!isTokenValid) {
|
||||
if (state == SyncState.Killing) {
|
||||
continue
|
||||
}
|
||||
Timber.tag(loggerTag.value).d("Token is invalid. Waiting...")
|
||||
updateStateTo(SyncState.InvalidToken)
|
||||
synchronized(lock) { lock.wait() }
|
||||
|
|
Loading…
Add table
Reference in a new issue