mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-23 14:41:08 +00:00
Retry connection exceptions on IPv4 only
This commit is contained in:
parent
c036c686a6
commit
ba0d63e5d0
1 changed files with 2 additions and 1 deletions
|
@ -18,6 +18,7 @@ import com.bugsnag.android.BreadcrumbType;
|
|||
import com.bugsnag.android.Bugsnag;
|
||||
import com.sun.mail.imap.IMAPStore;
|
||||
import com.sun.mail.smtp.SMTPTransport;
|
||||
import com.sun.mail.util.MailConnectException;
|
||||
|
||||
import org.xbill.DNS.Lookup;
|
||||
import org.xbill.DNS.SimpleResolver;
|
||||
|
@ -272,7 +273,7 @@ public class ConnectionHelper {
|
|||
static void connect(Context context, ServiceHolder iservice, String host, int port, String user, String password) throws MessagingException {
|
||||
try {
|
||||
iservice.connect(context, host, port, user, password);
|
||||
} catch (MessagingException ex) {
|
||||
} catch (MailConnectException ex) {
|
||||
if (!hasIPv6(host))
|
||||
throw ex;
|
||||
|
||||
|
|
Loading…
Reference in a new issue