chore: implementiere Zustandsprüfung für DiscoveryService und ConnectivityTracker, verbessere Plug-and-Play-Kompatibilität und optimiere LAN-Discovery
Signed-off-by: StefanMoCoAt <stefan.mo.co@gmail.com>
This commit is contained in:
+2
-5
@@ -21,11 +21,8 @@ class ConnectivityTracker : KoinComponent {
|
||||
|
||||
private val scope = CoroutineScope(Dispatchers.Default + SupervisorJob())
|
||||
|
||||
init {
|
||||
startTracking()
|
||||
}
|
||||
|
||||
private fun startTracking() {
|
||||
fun startTracking() {
|
||||
if (scope.isActive && _isOnline.value) return // Bereits aktiv (Dummy-Check)
|
||||
scope.launch {
|
||||
while (isActive) {
|
||||
_isOnline.value = checkConnection()
|
||||
|
||||
Reference in New Issue
Block a user