Consider mac connections as I/O error

pull/175/head
M66B 5 years ago
parent d88b7036e1
commit 762e4ee6ec

@ -3401,7 +3401,6 @@ class Core {
private Semaphore semaphore = new Semaphore(0);
private boolean running = true;
private boolean recoverable = true;
private boolean maxConnections = false;
private Long lastActivity = null;
private Map<FolderPriority, Long> sequence = new HashMap<>();
@ -3471,17 +3470,8 @@ class Core {
yield();
}
void setMaxConnections() {
maxConnections = true;
}
boolean getMaxConnections() {
return maxConnections;
}
void reset() {
recoverable = true;
maxConnections = false;
lastActivity = null;
synchronized (this) {
for (FolderPriority key : sequence.keySet()) {

@ -873,10 +873,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
EntityLog.log(ServiceSynchronize.this, account.name + " alert: " + message);
boolean max = isMaxConnections(message);
if (max)
state.setMaxConnections();
if (!max || state.getBackoff() > CONNECT_BACKOFF_MAX)
if (!isMaxConnections(message))
try {
NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
nm.notify("alert:" + account.id, 1,
@ -906,10 +903,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
boolean ioError = false;
Throwable c = ex;
while (c != null) {
boolean max = isMaxConnections(c.getMessage());
if (max)
state.setMaxConnections();
if (max ||
if (isMaxConnections(c.getMessage()) ||
c instanceof IOException ||
c instanceof ConnectionException ||
c instanceof AccountsException ||

Loading…
Cancel
Save