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() { ...@@ -307,11 +307,10 @@ class NodeClient() {
Log.d(TAG, "Connection rejected due to device auth, will send pairing request on reconnect") Log.d(TAG, "Connection rejected due to device auth, will send pairing request on reconnect")
// Set flag to send pairing request after reconnect // Set flag to send pairing request after reconnect
pendingPairingAfterConnect = true pendingPairingAfterConnect = true
// Reconnect // Reconnect after brief delay using Handler
scope.launch { android.os.Handler(android.os.Looper.getMainLooper()).postDelayed({
delay(500) // Brief delay before reconnecting
connect(currentNodeId, currentToken, capabilities) connect(currentNodeId, currentToken, capabilities)
} }, 500)
return 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