From 408c84f8d7dd1eb5069f43a6687dcf2cc4d16543 Mon Sep 17 00:00:00 2001 From: Mygod Date: Wed, 3 Oct 2018 13:53:57 +0800 Subject: [PATCH] Fix DNS not updated onLost --- mobile/src/main/java/be/mygod/vpnhotspot/net/Routing.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/net/Routing.kt b/mobile/src/main/java/be/mygod/vpnhotspot/net/Routing.kt index 2de1e918..4fea3e60 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/net/Routing.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/net/Routing.kt @@ -95,6 +95,8 @@ class Routing(val downstream: String, ownerAddress: InterfaceAddress? = null) { TrafficRecorder.update() // record stats before removing rules to prevent stats losing subrouting.revert() this.subrouting = null + dns = emptyList() + updateDnsRoute() } } private val fallbackUpstream = object : Upstream(RULE_PRIORITY_UPSTREAM_FALLBACK) {