Commit 10f06934 authored by Lisa (AI Assistant)'s avatar Lisa (AI Assistant)

Fix: Ensure connection status is emitted on WebSocket close

parent 1d0cb0f8
......@@ -297,6 +297,8 @@ class NodeClient() {
}
webSocket.close(1000, null)
// Emit connection status
_connectionStatus.trySend(ConnectionStatus(false, nodeId))
}
override fun onClosed(webSocket: WebSocket, code: Int, reason: String) {
......@@ -312,9 +314,9 @@ class NodeClient() {
pendingPairingAfterConnect = true
// Don't reconnect here - let the app retry naturally
// The next connect() call will check pendingPairingAfterConnect
return
}
// Always emit connection status
_connectionStatus.trySend(ConnectionStatus(false, nodeId))
}
......
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