Reduce debugLog amount in IpNeighbourMonitor

This commit is contained in:
Mygod
2018-01-21 11:17:05 -08:00
parent 7f93b1e62b
commit d8b4a772ee

View File

@@ -68,9 +68,9 @@ class IpNeighbourMonitor private constructor() {
}
try {
monitor.inputStream.bufferedReader().forEachLine {
debugLog(TAG, it)
synchronized(neighbours) {
val neighbour = IpNeighbour.parse(it) ?: return@forEachLine
debugLog(TAG, it)
val changed = if (neighbour.state == IpNeighbour.State.DELETING)
neighbours.remove(neighbour.ip) != null
else neighbours.put(neighbour.ip, neighbour) != neighbour