Bolt question: How to properly disconnect client on application shutdown (ALT F4) ?


When I have 2 standalone clients connected to my server and when I do ALT-F4 on one of the clients, the server does not detect their disconnection, and the player server version stays active in the scene.

Also, if I do a manual disconnect on my standalone client (via BoltLauncher.Shutdown) the server detects the disconnection BUt it does not clear the disconnected player. It will only do a proper cleanup when I do a manual BoltLauncher.Shutdown.

It seems that doing the ALT-F4 quitting is too fast and does not allows the shutdown code to be called correctly. And it also seems like the disconnection does not destroy he player server version.

Anyone had this problem before?

Thanks for the help. :)


  • Clients should time out on disconnect, you can adjust the time out limit in Bolt Settings.

    I'm not sure what you mean by "clear the disconnected player". If you try the Advanced Tutorial sample the player disappears upon disconnect.

    The client can also disconnect from the server the same way you disconnect a client as a server.
  • Thanks, will check for this setting.

    About the "clear the disconnected player" I mean that the server do receive the Disconnected() call, but I clearly see that the player is not destroyed, it is still in the scene, wandeing, feeling alone.

    The difference in our current project is mostly that we do not use the scene loading system from Bolt. Ourimplementation manage the scene loading apart of it. I don't know if the scene loading or unloading can play a role in the detachment and destruction of the player on the server.
  • Destroying the player is up to the server if you are server authoritative. You can see how this is handles in the server auth sample "Advanced Tutorial".
  • Thanks for the help, it finally worked. I managed to destroy the players in the call to disconnected().

Sign In or Register to comment.