Bug report - OnLeave() callback called when a player with a clashing userId tries to join the room

Hello,

Apologies if this has already been reported (I did a quick search and didn't find anything similar).

This is a Photon plug-in issue.

When two or more players with the same userId try to join the same room, the 2nd player will correctly fail to join.
However, the photon plug-in will call OnLeave() callback for that 2nd player (even though OnJoin() for that player was not called).

This makes the plug-in assume that the 1st player, left the room (while in fact it may still be connected).

The use case scenario when it may be relevant is when a user have the game installed on more than one PC and try to run the game on both.

I am currently using Photon server version 4.0.28.2962.

Thanks,
Sylwester

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited March 2019
    Hi @Sly,

    Thank you for choosing Photon and for your bug report!

    You are using an old version, can you update to a newer version?
    Latest is v4.0.29.11263.

    When OnLeave() is called, what is the ActorNr or LeaveReson values?
    Maybe you can use as a workaround if you can't update?

    If the issue persists with v4.0.29.11263 send us an email to developer@photonengine.com
  • Hey @JohnTube,

    Thanks for your suggestions.
    It's not a big issue for me as I worked around it by checking if a user with the same ID already exists in OnBeforeJoin() and rejecting the duplicated one. When I do this, OnLeave() is not called.

    Just wanted to report it as it seemed like an incorrect behaviour and wasn't sure you guys have been aware of this.

    We're now in a position to be able to upgrade to the newest version, so I'll report back when it's done and I've retested.

    Thanks,
    Sylwester