diff --git a/packages/@dcl/sdk/src/network/message-bus-sync.ts b/packages/@dcl/sdk/src/network/message-bus-sync.ts index b4ee9eeb4..be683721e 100644 --- a/packages/@dcl/sdk/src/network/message-bus-sync.ts +++ b/packages/@dcl/sdk/src/network/message-bus-sync.ts @@ -86,8 +86,8 @@ export function addSyncTransport( DEBUG_NETWORK_MESSAGES() && console.log(`Requesting state. Players connected: ${players.length - 1}`) if (!RealmInfo.getOrNull(engine.RootEntity)?.isConnectedSceneRoom) { - DEBUG_NETWORK_MESSAGES() && console.log(`Aborting Requesting state. Disconnected`) - return + DEBUG_NETWORK_MESSAGES() && console.log(`Aborting Requesting state?. Disconnected`) + // return } binaryMessageBus.emit(CommsMessage.REQ_CRDT_STATE, engineToCrdt(engine)) @@ -128,6 +128,10 @@ export function addSyncTransport( stateIsSyncronized = false } + if (value?.isConnectedSceneRoom) { + DEBUG_NETWORK_MESSAGES() && console.log('Connected to comms') + } + if (value?.isConnectedSceneRoom && !stateIsSyncronized) { void requestState() }