Skip to content

Commit

Permalink
Issue #8502 Added catch block for InvalidDnsNameException
Browse files Browse the repository at this point in the history
  • Loading branch information
Its-Aki committed Nov 11, 2024
1 parent 2ea48ca commit 73bb7a8
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 73bb7a8

Please sign in to comment.