Kill old monitor silently

This commit is contained in:
Mygod
2018-01-25 20:22:14 -08:00
parent 53fdd0c250
commit 4a24b16008

View File

@@ -29,7 +29,8 @@ class IpNeighbourMonitor private constructor() {
if (!callbacks.remove(callback) || callbacks.isNotEmpty()) return
val monitor = instance ?: return
instance = null
monitor.monitor?.destroy()
val process = monitor.monitor
if (process != null) thread(TAG + "-killer") { process.destroy() }
}
/**