Fix race in LOHS
This commit is contained in:
@@ -37,13 +37,12 @@ class LocalOnlyHotspotService : IpNeighbourMonitoringService(), CoroutineScope {
|
|||||||
|
|
||||||
val configuration get() = reservation?.wifiConfiguration
|
val configuration get() = reservation?.wifiConfiguration
|
||||||
|
|
||||||
fun stop() = when (iface) {
|
fun stop() {
|
||||||
null -> { } // stopped
|
when (iface) {
|
||||||
"" -> {
|
null -> return // stopped
|
||||||
WifiApManager.cancelLocalOnlyHotspotRequest()
|
"" -> WifiApManager.cancelLocalOnlyHotspotRequest()
|
||||||
reservation?.close() ?: stopService()
|
|
||||||
}
|
}
|
||||||
else -> reservation!!.close()
|
reservation?.close() ?: stopService()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user