[EOF] is an I/O error

This commit is contained in:
M66B 2022-10-28 16:16:20 +02:00
parent 1322f4a64b
commit 5cb23173df
1 changed files with 8 additions and 0 deletions

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;
}