Fix conneciton looping

This commit is contained in:
loucass003 committed 2026-09-15 01:08:21 +02:00
1 parent 65cdc83e3c
commit be2c16d827
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -25,7 +25,7 @@ import { boneRegistryAtom } from '@/store/app-store';
import { bodyPartOfKey } from '@/utils/body-part';
// Must match SOLARXR_PROTOCOL_VERSION in server/core/.../solarxr/protocol.kt
const SOLARXR_PROTOCOL_VERSION = 3;
const SOLARXR_PROTOCOL_VERSION = 2;
type ConnectionPhase = 'awaiting-hello' | 'configuring' | 'ready';
@@ -8,7 +8,7 @@ suspend fun onSolarXRMessage(message: MessageBundle, context: SolarXRBridge) {
val wasReady = context.isReady
message.connectionMsgs?.forEach { header -> onConnectionMessage(header.message, context) }
if (!wasReady) {
if (message.dataFeedMsgs != null || message.rpcMsgs != null || message.driverMsgs != null) {
if (!message.dataFeedMsgs.isNullOrEmpty() || !message.rpcMsgs.isNullOrEmpty() || !message.driverMsgs.isNullOrEmpty()) {
context.sendConnectionMessage(ConnectionError(message = "Configuration has not completed", data = InitializationRequiredError()))
}
return