Check if room exist when reconnect

We are using Photon Server and recently encountered a problem when reconnecting.
When player disconnect and try to reconnect to the same room, we need to be able to determine if the room still exist.
Currently we set the rooms to be invisible to prevent others from joining.
Before player try to reconnect to the named room, we want to check if all other players have left the room, so we don't have players trying to join empty rooms.

Any help or suggestions are welcomed

Thanks

Comments

  • Hi @Warbears,

    Thank you for choosing Photon!

    The problem should not exist if you create rooms with roomOptions.EmptyRoomTTL = 0.
    This way as soon as a room is empty it will be destroyed.

    Otherwise, close rooms (set IsOpen = false) to disallow future joins.
  • Thank you very much for the prompt reply!

    I wonder if there is a way to check if a room exist with specific room name?
    Especially if the room is set to be invisible.

    Thanks again!
Sign In or Register to comment.