Wrong error handler

Options
Hi,
We encountered the following problem:

1) We use JoinRandomRoom to join rooms, which after a while we close

2) But for some reason, we get an error when trying to join a room, that the room is closed and we get this error inside: OnPhotonJoinRoomFailed, instead in OnPhotonRandomJoinFailed? Any ideas or is this by design?

I guess there is some sync problem, between the user trying to join a room and the room being closed, but we expect to receive this error in the correct error handler.



Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited March 2016
    Options
    Hi @kamend,

    Calling JoinRandomRoom triggers a sequence of 2 consecutive operations in LoadBalancing:
    1. Operation JoinRandomRoom on MasterServer which returns a GameServer IP and GameID if any or "throws" OnPhotoRandomJoinRoomFailed in PUN.
    2. Operation JoinRoom on GameServer which "throws" OnPhotonJoinRoomFailed in PUN if the operation is not successful.
  • kamend
    kamend
    edited March 2016
    Options
    Ok, so I guess it could return errors in both callbacks, good to know. This is pretty bad design, because the names of the callbacks imply a different behaviour.
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited March 2016
    Options
    In case of failure of random join, one error callback only will be triggered can't be both at the same time. The error is either in finding a match on MasterServer which is normal and OK or an unexpected issue in joining the matched room on GameServer which could rarely happen. Please report any cases of the latter.
  • kamend
    Options
    Well in my case, the OnJoinRoomFailed was called when the room was already closed, when I try to login. For some reason, the random algorithm on Photon's server thinks that the room is still open, but when the joining actually happens, it is closed, so it gives an error. The idea is that I would expect a Closed Room error to appear in the OnPhotonRandomJoinFailed, because I am actually joining a random room, but like I said this is not the case.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    If this is happening too often for you please send us an email to developer@photonengine.com with your AppID and a brief description of the issue. It would help to have the room names from the logs if you have them (in the operation response parameters of operation JoinRandomRoom (code 225), the key of GameID is 255).

    But don't expect a reply before Tuesday.
    Thank you.