RaiseEvent Not Working,When player disconnects just After Raising Event

Kiraaa23
Kiraaa23
edited July 2020 in Photon Server
Hi Guys,
I am having a problem with RaiseEvent.
RaiseEvent Not Working When a player disconnects just After Raising Event.

Let me explain the scenario
Currently, I am working on a turn-based card game, I am using RaiseEvents to switch turn to the next player once the current player finishes his/her turn.

It was all working fine until at certain times when a player disconnects suddenly just after raising FinishTurn Event, the event is NOT being received by the other players in the room.

Is there any way to know that the sent event was failed and again retry raising event when the disconnected player rejoins room after some time?




Comments

  • hi, @Kiraaa23

    there is not way to know that some one did not get server event. but if you will use Event Cache, then next time when player rejoins he will get it

    please take a look here: https://doc.photonengine.com/en-US/realtime/current/gameplay/cached-events

    best,
    ilya
  • Thank You @chvetsov

    I tried Cache Events, it's working when the disconnected player is at the receiving end of the Event but it is NOT working when disconnected player himself raises an Event just before Disconnecting.

    Actually I am disconnecting player explicitly when he/she goes into the Background and pausing the game for all the remaining users until the disconnected player rejoins room within the Time Limit i.e 60 sec else I will kick out the disconnected player and resume the game for remaining players.

    The problem occurs when a player goes into the background just after finishing his/her move, at a point in which the finish turn Event has to be Raised.

    Other players are not receiving Event when this is happening and Even when the player rejoins, the event is NOT being Raised.

    Please Help me..







  • @Kiraaa23, I am very sorry to say that we do not have any kind of magic - do not disconnect player so quickly. wait for event from server and then disconnect

    best,
    ilya
  • ya sure anyway thank you for your response @chvetsov .