Commit b9f39755 authored by Lisa (AI Assistant)'s avatar Lisa (AI Assistant)

Fix: Use Handler instead of coroutine scope

parent 3180219d
......@@ -307,11 +307,10 @@ class NodeClient() {
Log.d(TAG, "Connection rejected due to device auth, will send pairing request on reconnect")
// Set flag to send pairing request after reconnect
pendingPairingAfterConnect = true
// Reconnect
scope.launch {
delay(500) // Brief delay before reconnecting
// Reconnect after brief delay using Handler
android.os.Handler(android.os.Looper.getMainLooper()).postDelayed({
connect(currentNodeId, currentToken, capabilities)
}
}, 500)
return
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment