I can't join the room which I just left

I have 2 players playing Demo Asteroids, one is on my Unity and one is on build.
Player 2 created a room for 2 players and player 1 joined it ( it runs perfectly of course)
Then player 1 left the room and click "Show Room List" Button, it shows that room with 2/2 players and I only can rejoin this room after few seconds. Can you explain me why ? ( Sorry for my bad English )

Best Answer

  • Tobias
    Tobias admin
    Accepted Answer
    I am not sure what your exact question is about.


    Behind the scenes, there are different ways to leave a room.

    If a room has a PlayerTTL, players may actually become inactive in a room (not joined currently) but still be part of the room. If there is a PlayerTTL, the player becomes inactive on disconnect / closing the connection and it's possible to use ReconnectAndRejoin to re-join the room (until the PlayerTTL passed).

    If there is no PlayerTTL, leaving players and anyone who drops connection, will just be removed from the rooms player list.

    If a connection fails instead of doing a "disconnect", the server will not know the player left and list the room with 2/2 players until a timeout happened.

    And last but not least: The room list is updated in intervals, so it's not always exact.

    A room may be closed and or you may set it's IsVisible = false, which means it's no longer listed anyways.


    Hope this gives you some background.

Answers

  • Tobias
    Tobias admin
    Accepted Answer
    I am not sure what your exact question is about.


    Behind the scenes, there are different ways to leave a room.

    If a room has a PlayerTTL, players may actually become inactive in a room (not joined currently) but still be part of the room. If there is a PlayerTTL, the player becomes inactive on disconnect / closing the connection and it's possible to use ReconnectAndRejoin to re-join the room (until the PlayerTTL passed).

    If there is no PlayerTTL, leaving players and anyone who drops connection, will just be removed from the rooms player list.

    If a connection fails instead of doing a "disconnect", the server will not know the player left and list the room with 2/2 players until a timeout happened.

    And last but not least: The room list is updated in intervals, so it's not always exact.

    A room may be closed and or you may set it's IsVisible = false, which means it's no longer listed anyways.


    Hope this gives you some background.