Sometimes Rejoin failed in c++ sdks
Hi,
I'm using c++ sdks and building a turn-based game.
I'm using the checkUserWhenJoin to check user's ID (unique) when users re-join the game.
but sometimes it says that there is already an user with the same name.
detail process
0. connected, joined, playing
1. clientErrorReturn 2 or 3 times
2. connectionErrorReturn connection failed
3. call connect again
4. connected
5. joinRoom again with actorNr = 1
6. joinRoom failed because the player is still in the room.
Please correct me if any process is not proper.
Thanks!
Jo
I'm using c++ sdks and building a turn-based game.
I'm using the checkUserWhenJoin to check user's ID (unique) when users re-join the game.
but sometimes it says that there is already an user with the same name.
detail process
0. connected, joined, playing
1. clientErrorReturn 2 or 3 times
2. connectionErrorReturn connection failed
3. call connect again
4. connected
5. joinRoom again with actorNr = 1
6. joinRoom failed because the player is still in the room.
Please correct me if any process is not proper.
Thanks!
Jo
0
Best Answer
-
Hi JoH.
checkUserWhenJoin?
Is that your wording? I can't find any identifier with that name in the codebase.
If the client gets disconnected due to a client-side timeout, then the server may still see it as connected for a few more seconds, before it also considers the client to be disconnected. In that case simply wait for a few seconds and then retry the rejoin-operation.5
Answers
-
Hi JoH.
checkUserWhenJoin?
Is that your wording? I can't find any identifier with that name in the codebase.
If the client gets disconnected due to a client-side timeout, then the server may still see it as connected for a few more seconds, before it also considers the client to be disconnected. In that case simply wait for a few seconds and then retry the rejoin-operation.5 -
it's CheckUserOnJoin = true.
Thanks a lot.0