PhotonNetwork.CloseConnection alternatives

I am trying to implement a routine to check for a stalled MasterClient and assign a new one, if the current is not responding. But other thing I must do is kick/disconnect the stalled MasterClient from the room. I tried PhotonNetwork.CloseConnection, but as far as I understand that actually send an event to the Player to disconnect by himself, but in the case of a stalled client (this could happen on mobile a lot, the player has pressed the Home button) this is not a solution, because the client will never disconnect. I could try to destroy all his objects and etc, but as far as I understand, on the server he will still keep one slot inside the room, so if the room is max 4 players, we will have 1 slot less.

Any idea how to say to the server, this player is stalled, disconnect it or is this actually possible in the current Photon setup?


  • if Disconnect() on it's own doesn't work, maybe try having a public void function on each player that will call Disconnect() if the player is a master client, and then the function can be called via RPC ?
  • Well, I send an RPC call to all clients, that user X disconnected and they fake the disconnect, but still it will be better if that use can be kicked out of the room.
  • Any ideas from Photon's dev here?
  • At the moment, we don't have a server-side kick option. We thought about adding one but didn't get around to do it yet.

    You could use SetMasterClient( to set the master and then ignore the player who's inactive in the game logic.
  • srmatthesrmatthe
    edited January 2016
    Did anything get added for a server side kick in the end
  • Also wondering about this
  • I'm also in need of such a feature. CloseConnection won't cut it when the player's client is completely unresponsive but for some reason hasn't left the room.

    Was a server-side kick function ever implemented? I can't find anything.
  • Can a developer please address this?
Sign In or Register to comment.