diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java index ad9c335f97..dbc38a49b8 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -48,6 +48,7 @@ import androidx.lifecycle.MutableLiveData; import androidx.lifecycle.Observer; import androidx.preference.PreferenceManager; +import com.sun.mail.iap.ConnectionException; import com.sun.mail.imap.IMAPFolder; import com.sun.mail.imap.IMAPStore; @@ -855,13 +856,19 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences boolean max = isMaxConnections(c.getMessage()); if (max) state.setMaxConnections(); - if (c instanceof IOException || max) { + if (max || + c instanceof IOException || + c instanceof ConnectionException || + "failed to connect".equals(ex.getMessage())) { ioError = true; break; } c = c.getCause(); } + if (!BuildConfig.PLAY_STORE_RELEASE) + Log.e(ex); + if (!ioError) { NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); nm.notify("receive:" + account.id, 1,