PhotonNetwork.CloseConnection alternatives
Options
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?
Any idea how to say to the server, this player is stalled, disconnect it or is this actually possible in the current Photon setup?
0
Comments
-
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 ?0
-
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.0
-
Any ideas from Photon's dev here?0
-
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(player.id) to set the master and then ignore the player who's inactive in the game logic.-1 -
Did anything get added for a server side kick in the end0
-
Also wondering about this0
-
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.0 -
Can a developer please address this?0