Always clean routings on exit
This commit is contained in:
@@ -114,6 +114,7 @@ class TetheringService : IpNeighbourMonitoringService() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
|
routings.values.forEach { it?.revert() } // force clean to prevent leakage
|
||||||
unregisterReceiver()
|
unregisterReceiver()
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user