From 07f263419bb1ed6e56e9dccb00876be1addb05bd Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 28 Aug 2018 06:37:09 +0000 Subject: [PATCH] Suppress SSL handshake exceptions --- app/src/main/java/eu/faircode/email/ServiceSynchronize.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java index 53062a6358..86fb9de8c9 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -102,6 +102,7 @@ import javax.mail.internet.MimeMessage; import javax.mail.internet.ParseException; import javax.mail.search.ComparisonTerm; import javax.mail.search.ReceivedDateTerm; +import javax.net.ssl.SSLHandshakeException; import androidx.annotation.Nullable; import androidx.core.content.ContextCompat; @@ -367,7 +368,8 @@ public class ServiceSynchronize extends LifecycleService { !(ex instanceof FolderClosedException) && !(ex instanceof IllegalStateException) && !(ex instanceof MessagingException && ex.getCause() instanceof ConnectionException) && - !(ex instanceof MessagingException && ex.getCause() instanceof SocketTimeoutException)) { + !(ex instanceof MessagingException && ex.getCause() instanceof SocketTimeoutException) && + !(ex instanceof MessagingException && ex.getCause() instanceof SSLHandshakeException)) { String action; if (TextUtils.isEmpty(account)) action = folder;