1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-27 10:17:18 +00:00

Added logging

This commit is contained in:
M66B 2022-03-14 16:24:40 +01:00
parent d07e1ffcc2
commit eb5c349951

View file

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