Sanitize read/write errors

pull/160/head
M66B 5 years ago
parent 78e9ed5dd9
commit deab3432b5

@ -99,6 +99,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import javax.mail.FolderClosedException;
import javax.mail.MessageRemovedException;
import javax.mail.MessagingException;
import static android.os.Process.THREAD_PRIORITY_BACKGROUND;
import static androidx.browser.customtabs.CustomTabsService.ACTION_CUSTOM_TABS_CONNECTION;
@ -426,6 +427,13 @@ public class Helper {
if (ex instanceof MessageRemovedException)
return null;
if (ex instanceof MessagingException &&
ex.getCause() instanceof ConnectionException &&
ex.getCause().getMessage() != null &&
(ex.getCause().getMessage().contains("Read error") ||
ex.getCause().getMessage().contains("Write error")))
return null;
if (ex instanceof IOException &&
ex.getCause() instanceof MessageRemovedException)
return null;

Loading…
Cancel
Save