mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-15 08:29:24 +00:00
Added connection breadcrumbs
This commit is contained in:
parent
acaa16fe1e
commit
dba78b75c4
1 changed files with 12 additions and 0 deletions
|
@ -526,6 +526,11 @@ public class EmailService implements AutoCloseable {
|
|||
private void connect(
|
||||
String host, int port, int auth, String user,
|
||||
SSLSocketFactoryService factory) throws MessagingException {
|
||||
Map<String, String> crumb = new HashMap<>();
|
||||
crumb.put("host", host);
|
||||
crumb.put("port", Integer.toString(port));
|
||||
crumb.put("auth", Integer.toString(auth));
|
||||
|
||||
InetAddress main = null;
|
||||
boolean require_id = (purpose == PURPOSE_CHECK &&
|
||||
auth == AUTH_TYPE_OAUTH &&
|
||||
|
@ -569,10 +574,17 @@ public class EmailService implements AutoCloseable {
|
|||
}
|
||||
}
|
||||
|
||||
Log.breadcrumb("Connecting", crumb);
|
||||
_connect(main, port, require_id, user, factory);
|
||||
Log.breadcrumb("Connected", crumb);
|
||||
} catch (UnknownHostException ex) {
|
||||
crumb.put("exception", ex + "\n" + android.util.Log.getStackTraceString(ex));
|
||||
Log.breadcrumb("Connection failed", crumb);
|
||||
throw new MessagingException(ex.getMessage(), ex);
|
||||
} catch (MessagingException ex) {
|
||||
crumb.put("exception", ex + "\n" + android.util.Log.getStackTraceString(ex));
|
||||
Log.breadcrumb("Connection failed", crumb);
|
||||
|
||||
/*
|
||||
com.sun.mail.util.MailConnectException: Couldn't connect to host, port: 74.125.140.108, 993; timeout 20000;
|
||||
nested exception is:
|
||||
|
|
Loading…
Add table
Reference in a new issue