Skip to content

Commit

Permalink
Merge pull request #8546 from Its-Aki/Its-Aki-fix-8502_crash-when-set…
Browse files Browse the repository at this point in the history
…ting-up-account

Added catch block for InvalidDnsNameException
  • Loading branch information
cketti authored Nov 12, 2024
2 parents 55e9238 + 73bb7a8 commit 5627edf
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
}
}

Expand Down

0 comments on commit 5627edf

Please sign in to comment.