Refresh token on each connect

This commit is contained in:
M66B 2018-08-28 06:58:57 +00:00
parent fe17a18d24
commit 0ac5c41052
1 changed files with 16 additions and 15 deletions

View File

@ -389,6 +389,9 @@ public class ServiceSynchronize extends LifecycleService {
final DB db = DB.getInstance(this);
final ExecutorService executor = Executors.newSingleThreadExecutor();
int backoff = CONNECT_BACKOFF_START;
while (state.running) {
// Debug
boolean debug = PreferenceManager.getDefaultSharedPreferences(this).getBoolean("debug", false);
if (debug)
System.setProperty("mail.socket.debug", "true");
@ -404,8 +407,6 @@ public class ServiceSynchronize extends LifecycleService {
isession.setDebug(debug);
// adb -t 1 logcat | grep "fairemail\|System.out"
int backoff = CONNECT_BACKOFF_START;
while (state.running) {
final IMAPStore istore = (IMAPStore) isession.getStore("imaps");
final Map<EntityFolder, IMAPFolder> folders = new HashMap<>();
List<Thread> noops = new ArrayList<>();