JoinOrCreateRoom adds two clients as master in the same room
Options
I noticed after using JoinOrCreateRoom (PUN2) that both clients were added to the same room as ActorNumber = 1 and MasterClient = true. Is this something we are suppose to account for or is this a bug?
Thanks in advance!
Thanks in advance!
0
Comments
-
Hi @meatloaf,I noticed after using JoinOrCreateRoom (PUN2) that both clients were added to the same room as ActorNumber = 1Could you make sure that both clients are joined to the exact same room? Just print the room name and all users inside with their ActorNr, UserId and if they are MasterClient or not.
After double checking:
This is not expected.
What PUN2 version is this?
Could you send us 100% repro steps?0 -
I have confirmed it was the exact same room name, ActorNumbers and MasterClient. As for sending you the exact repro steps i'm not sure as it was part of our main game flow. I want to say it might have been a race condition as both players were calling JoinOrCreateRoom at nearly the same time.
If the issue occurs again i'll try and further track it down and reproduce it so we can get it fixed .
As for my pun version i'm currently onPun: 2.4 Photon lib 4.1.2.4
0 -
Ok just had the bug occur again, here is an image confirming the issue.
The left and right "SR Options" Windows are two different clients spitting out there photon room values.
https://drive.google.com/file/d/1tQReY0FOl0ncvbNZ3DKbplbFhAo87fdw/view?usp=sharing0 -
Hi @meatloaf,
This still does not prove that both clients are inside the same room.
They can be joined to different rooms with the same name because they are connected to different servers.
Make sure that clients are connected to the same region and using the same PUN version and AppVersion and AppId, etc.
"Matchmaking Checklist"0 -
Ah after doing some investigating I think i have figured it out.
I was setting myGameVersion
before callingConnectUsingSettings
, but after disconnecting, my subsequentConnectUsingSettings
calls did not setGameVersion
again first.
After staring at this for a while though I did notice something strange. If I call the below method before ever connecting, myAppVersion = 74_2.4
. However if I Disconnect -> ConnectToOfflineRoom -> Reconnect using the below method, myAppVersion = _2.4
.private bool ConnectUsingSettingsAndGameVersion() { PhotonNetwork.GameVersion = gameVersion; return PhotonNetwork.ConnectUsingSettings(); }
Hope this makes sense. Thanks in advance!0