Do not spawn another process to kill monitor

This commit is contained in:
Mygod
2019-01-26 01:26:38 +08:00
parent 469a0cd669
commit 59713a1eb5

View File

@@ -103,8 +103,7 @@ abstract class IpMonitor : Runnable {
fun destroy() {
destroyed = true
val monitor = monitor
if (monitor != null) thread("${javaClass.simpleName}-killer") { monitor.destroy() }
monitor?.destroy()
pool?.shutdown()
}
}