how to check when master client goes to inactive state by network timeout

i have used photonnetwork.mastrerclient.isinactive to check when master goes to network disconnect by switch offing the network connection in mobile but it has no effect how to know when master goes to inactive by network timeout by other clients and assigning next master server

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited December 2018
    Hi @chandru,

    Thank you for choosing Photon!

    photonnetwork.mastrerclient.isinactive
    This is always false. As the MasterClient can never be inactive and any inactive actor cannot be the MasterClient (unless the room is empty).

    As we explain on this page, you could have a timeout detection mechanism based on custom reliable heartbeat events sent by the MasterClient or from the MasterClient and keeping the timestamp of the last event.