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

Fix: Set flag instead of trying to reconnect in onClosed

parent b9f39755
...@@ -307,10 +307,8 @@ class NodeClient() { ...@@ -307,10 +307,8 @@ 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 after brief delay using Handler // Don't reconnect here - let the app retry naturally
android.os.Handler(android.os.Looper.getMainLooper()).postDelayed({ // The next connect() call will check pendingPairingAfterConnect
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