From 05012783a38fecb6ac47ff6ee8757a4726864796 Mon Sep 17 00:00:00 2001 From: Mygod Date: Sun, 6 Jan 2019 02:04:17 +0800 Subject: [PATCH] Always clean routings on exit --- mobile/src/main/java/be/mygod/vpnhotspot/TetheringService.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/TetheringService.kt b/mobile/src/main/java/be/mygod/vpnhotspot/TetheringService.kt index e4b9dfac..3366c28c 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/TetheringService.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/TetheringService.kt @@ -114,6 +114,7 @@ class TetheringService : IpNeighbourMonitoringService() { } override fun onDestroy() { + routings.values.forEach { it?.revert() } // force clean to prevent leakage unregisterReceiver() super.onDestroy() }