Added logging

pull/207/head
M66B 3 years ago
parent d07e1ffcc2
commit eb5c349951

@ -521,13 +521,14 @@ public class EmailService implements AutoCloseable {
String key = "dns." + host;
try {
main = InetAddress.getByName(host);
EntityLog.log(context, "Resolved " + main);
prefs.edit().putString(key, main.getHostAddress()).apply();
} catch (UnknownHostException ex) {
String last = prefs.getString(key, null);
if (TextUtils.isEmpty(last))
throw new MessagingException(ex.getMessage(), ex);
else {
Log.w("Using " + key + "=" + last);
EntityLog.log(context, "Using " + key + "=" + last);
main = InetAddress.getByName(last);
}
}

Loading…
Cancel
Save