Fix race in init
This commit is contained in:
@@ -99,7 +99,7 @@ abstract class IpMonitor {
|
||||
}
|
||||
}
|
||||
|
||||
init {
|
||||
protected fun init() {
|
||||
thread(name = "${javaClass.simpleName}-input") {
|
||||
val mode = currentMode
|
||||
if (mode.isMonitor) {
|
||||
|
||||
@@ -57,6 +57,10 @@ class IpNeighbourMonitor private constructor() : IpMonitor() {
|
||||
}
|
||||
private var neighbours = persistentMapOf<IpDev, IpNeighbour>()
|
||||
|
||||
init {
|
||||
init()
|
||||
}
|
||||
|
||||
override val monitoredObject: String get() = "neigh"
|
||||
|
||||
override fun processLine(line: String) {
|
||||
|
||||
Reference in New Issue
Block a user