Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 5627edf7 authored by cketti's avatar cketti Committed by GitHub
Browse files

Merge pull request #8546 from Its-Aki/Its-Aki-fix-8502_crash-when-setting-up-account

Added catch block for InvalidDnsNameException
parents 55e92380 73bb7a8d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ import app.k9mail.core.common.net.Domain
import com.fsck.k9.logging.Timber
import java.io.IOException
import okhttp3.OkHttpClient
import org.minidns.dnsname.InvalidDnsNameException

class MxLookupAutoconfigDiscovery internal constructor(
    private val mxResolver: SuspendableMxResolver,
@@ -69,6 +70,9 @@ class MxLookupAutoconfigDiscovery internal constructor(
        } catch (e: IOException) {
            Timber.d(e, "Failed to get MX record for domain: %s", domain.value)
            null
        } catch (e: InvalidDnsNameException) {
            Timber.d(e, "Invalid DNS name for domain: %s", domain.value)
            null
        }
    }