Skip to content

Commit

Permalink
add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
gonpombo8 committed Oct 18, 2024
1 parent 331f382 commit f83ebfa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/@dcl/sdk/src/network/message-bus-sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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()
}
Expand Down

0 comments on commit f83ebfa

Please sign in to comment.