mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-26 10:55:09 +01:00
Prevent token refresh loop
This commit is contained in:
@@ -136,7 +136,8 @@ public class ServiceAuthenticator extends Authenticator {
|
||||
Log.e(ex);
|
||||
}
|
||||
|
||||
if (expiration != null && expiration - keep_alive < new Date().getTime())
|
||||
long slack = Math.min(keep_alive, 30 * 60 * 1000L);
|
||||
if (expiration != null && expiration - slack < new Date().getTime())
|
||||
throw new IllegalStateException(Log.TOKEN_REFRESH_REQUIRED);
|
||||
}
|
||||
|
||||
|
||||
@@ -2005,7 +2005,8 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
||||
}
|
||||
|
||||
// Check token expiration
|
||||
iservice.check();
|
||||
if (!account.isTransient(this))
|
||||
iservice.check();
|
||||
|
||||
// Sends store NOOP
|
||||
if (EmailService.SEPARATE_STORE_CONNECTION) {
|
||||
|
||||
Reference in New Issue
Block a user