Page 1 of 1

User kicked out of desired room

Posted: 14 Feb 2018, 00:57
by FireballFred
Here is the problematic sequence of events for me:
    User U1 creates and enters room R1
    User U2 enters R1
    User U1 exits the game
    User U2 enters room R2 (which already exists)

Expected behavior:
    User U2 leaves R1
    User U2 enters R2
    Room R1 gets destroyed (owner and all occupants have left)
    User U2 stays in R2 until he/she decides to leave

Actual behavior:
    User U2 leaves R1
    User U2 enters R2
    Room R1 gets destroyed
    User U2 gets booted from R2

This seems like a bug that sees R1 got destroyed so decides to kick the last user out of his/her last joined room, but the last joined room is R2 (not R1), so the user gets kicked from R2. U2 does get a USER_EXIT_ROOM event, with a room variable of R2.

Server Version 2.13.0
Unity Client v1.7.5
Happens locally and in production, every time I perform these steps.

Re: User kicked out of desired room

Posted: 14 Feb 2018, 09:53
by Lapo
Hello,
Actual behavior:
User U2 leaves R1
User U2 enters R2
Room R1 gets destroyed
User U2 gets booted from R2

Are there any client or server errors?

Is U2 actually booted from the Room or is there a join error?
Also, what type of Room is R2?
Are the join requests sent from client or server side?

Thanks

Re: User kicked out of desired room

Posted: 14 Feb 2018, 19:22
by FireballFred
I removed our server side extension while verifying this, so requests are all client side.
I'm not seeing errors on the server or client side. All rooms are not game rooms.

I managed to track down the issue.
We had a code path that had a reference to R1 and was calling LeaveRoomRequest(R1) after R1 was destroyed. The server was removing U2 from R2 after receiving the request to remove U2 from the non-existent R1.

We have fixed the issue by adding a check that JoinedRooms.Contains(R1) before that LeaveRoomRequest is made.

Thank you for your time.

Re: User kicked out of desired room

Posted: 15 Feb 2018, 08:57
by Lapo
Great! :)

Cheers