1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-30 11:45:36 +00:00

[EOF] is an I/O error

This commit is contained in:
M66B 2022-10-28 16:16:20 +02:00
parent 1322f4a64b
commit 5cb23173df

View file

@ -60,6 +60,7 @@ import java.util.List;
import java.util.Locale;
import java.util.Objects;
import javax.mail.MessagingException;
import javax.net.SocketFactory;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
@ -422,6 +423,12 @@ public class ConnectionHelper {
}
static boolean isIoError(Throwable ex) {
if (ex instanceof MessagingException &&
ex.getMessage() != null &&
ex.getMessage().contains("Got bad greeting") &&
ex.getMessage().contains("[EOF]"))
return true;
while (ex != null) {
if (isMaxConnections(ex.getMessage()) ||
ex instanceof IOException ||
@ -435,6 +442,7 @@ public class ConnectionHelper {
return true;
ex = ex.getCause();
}
return false;
}