Commit 97cb0cfe authored by Daniel Wolf's avatar Daniel Wolf
Browse files

Do not instantly show notification when resolve fails

parent 1cac3cd5
......@@ -760,7 +760,9 @@ class DnsVpnService : VpnService(), Runnable, CoroutineScope {
serverConfig.forEachAddress { _, address ->
val listener = address.addressCreator.whenResolveFinished { resolveException, resolveResult ->
if(resolveException != null) {
showNoConnectionNotification()
if(totalTries >= 5) {
showNoConnectionNotification()
}
if (resolveException is TimeoutException || resolveException is UnknownHostException) {
log("Address resolve failed: $resolveException. Total tries $totalTries/70")
if (totalTries <= 70) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment