Always clean routings on exit

This commit is contained in:
Mygod
2019-01-06 02:04:17 +08:00
parent 8b7b0b0b3e
commit 05012783a3

View File

@@ -114,6 +114,7 @@ class TetheringService : IpNeighbourMonitoringService() {
}
override fun onDestroy() {
routings.values.forEach { it?.revert() } // force clean to prevent leakage
unregisterReceiver()
super.onDestroy()
}