How i can remove duplicate user when user has crashed and login again

Options
I have a problem: when the user in game server and they had crashed. Late, they login again and game server not remove the old user.
How i can remove the old user in game server when they login again and join Lobby (Master server)

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @nesvn030,

    How do you leave rooms? what client SDK/version do you use?
    What PlayerTTL do you use?

    Actors who disconnect or leave the room with the "willBeBack" flag set to true, can become inactive and remain in the actors list if PlayerTTL is not zero.
    You could call leaveRoom with willBeBack flag set to false or use PlayerTTL = 0.
  • nesvn030
    nesvn030
    edited December 2019
    Options
    Thank for your response.
    Client : I use Photon iOS SDK version
    Server: I use Photon-OnPremise-Server-SDK version 4.0.28.2962
    I tried send opLeaveRoom with willBeBack=false (default) before the user kill the game.
    and PlayerTTL = 12000 but the game server not remove that player. I need this time for client can watch ads before the server disconnect user.
  • chvetsov
    Options
    hi, @nesvn030
    4.0.28 is quite old. It might contain some bugs. It is difficult to say right now. Please upgrade. The logic behind willBeBack=false is exactly what you need. A player is removed right away from the game, but still connected to GS. next you have to disconnect player.

    best,
    ilya
  • nesvn030
    Options
    I tried willBeBack=false and disconnect on client but GS still not remove player.
    I also upgrade version 4.0.29 (latest) but it same that error.

    I will try other way. Thank you.