onRoomListUpdate roomsAdded always [undefined]

may be there is a bug:
Photon-Javascript_SDK.js line:3354:
//roomsAdded.push(r);
roomsAdded.push(ri);

And I find that after 2 players leave a room, and one of them create a new room, the 2nd of them can't join the new room 1st&2nd&3rd..time. When try the 4th time, finally joined.

Comments


  • before the 2nd of them joinRandomRoom, I log availableRooms(),and see the result:
    playerCount: 2
    maxPlayers: 2

    maybe this is the result why cann't join the 1st player's new room.
    and, after a period of time(about 10s), call joinRandomRoom, and the result form availableRooms() change to normal, playerCount:1, and the 2nd player successful joind in.
  • vadimvadim ✭✭✭
    Hi,

    Sorry for the delay.
    The code is obviously wrong. But it will affect onRoomListUpdate callback behavior only and can't cause random room join failure. Thanks for bug report. We will fix it next release.

    Most frequent reason for random room join failure is max player count reached. To leave room instantly, you need to call leaveRoom(). In other cases like suspendRoom(), disconnect() or unexpected program termination, players remains in a room in "suspended" state for period from 10 sec. to infinity depending on 'suspendedPlayerLiveTime' option value specified when room created.

Sign In or Register to comment.