please delete post
edited December 2020
I don't know where to delete it.
Thank you for choosing Photon!
I don't think that the client is receiving a delayed Leave event for the wrong room because:
Leave event is received only for remote clients.
Leave event is received while still joined to the room.
Leave event is received on the Game Server.
Switching rooms is a long complex process abstracted in the SDK but it involves:
leaving the first room
disconnecting from game server
connecting back to master server
authenticating on master server
calling join room operation on master server
disconnecting from master server
connecting to the (new) game server
authenticating on the game server
calling join room operation on the game server
receiving own join event
So I'm not sure how this could be possible.
Maybe it's an issue with the event handling and subscription?
How do you subscribe and handle the leave event?
How do you switch rooms?
Are you loading scenes in between?
Which client SDK do you use?
Thank you so much for your post, I see it involves quite some task to join a new room. The mistake must be somewhere else on my side.