diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index 579075ee3b..d106dbee61 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -2182,6 +2182,11 @@ class Core { ex.getCause() instanceof ConnectionException)) recoverable = false; + if (ex instanceof ConnectionException) + // failed to create new store connection + // BYE, Socket is closed + recoverable = false; + if (ex instanceof FolderClosedException || ex instanceof FolderNotFoundException) recoverable = false; diff --git a/app/src/main/java/eu/faircode/email/Helper.java b/app/src/main/java/eu/faircode/email/Helper.java index 71bf4f41cf..fc69fcf342 100644 --- a/app/src/main/java/eu/faircode/email/Helper.java +++ b/app/src/main/java/eu/faircode/email/Helper.java @@ -59,6 +59,7 @@ import androidx.lifecycle.LifecycleOwner; import androidx.preference.PreferenceManager; import com.google.android.material.bottomnavigation.BottomNavigationView; +import com.sun.mail.iap.ConnectionException; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; @@ -398,6 +399,9 @@ public class Helper { ex.getCause() instanceof MessageRemovedException) return null; + if (ex instanceof ConnectionException) + return null; + if (ex instanceof FolderClosedException) return null;