Fix a subtle race

This commit is contained in:
Mygod
2020-01-15 20:32:30 +08:00
committed by GitHub
parent cd685feacd
commit 1f5c2ec9cb

View File

@@ -56,8 +56,8 @@ class TetheringService : IpNeighbourMonitoringService(), CoroutineScope {
if (downstream.monitor) downstream.start()
}
for ((iface, downstream) in toRemove) {
downstream.stop()
if (!downstream.monitor) check(downstreams.remove(iface, downstream))
downstream.stop()
}
onDownstreamsChangedLocked()
}