double checking the sync state in order to avoid redundant invalid token events
This commit is contained in:
parent
f61d20a7f8
commit
52731cf59d
@ -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…
Reference in New Issue
Block a user