"Shut Down All Instances" Broken

I’m trying to patch a bug in my game, and after having patched it I want to boot people out of the affected place however the “Shut down all servers” is not working. I am in-game and it refuses to end our servers (people still walking around).

Manually doing “shut down this server” seems to work after a minute of waiting, but the response is still unacceptably slow.

I fixed server shutting down slowly by kicking all players when game.OnClose is fired - the server doesn’t actually shutdown until after everything game.OnClose does is finished, or the 1 minute timeout happens.

Edit: Players wont be able to rejoin the server while its shutting down after they are kicked.

This could be the issue I’m seeing but the game shouldn’t hang with OnClose. It saves all of their data (which I wait for) and then the function ends.

Also, what I’m seeing when doing “Shut Down All Instances” is that the players keep moving around as if the server isn’t even attempting to stop.

Yes, that may be broken.

However - kicking before doing anything else w/ OnClose will solve them shutting down slowly.

Your saving operations and such will still happen. I think OnClose might wait 60 seconds even if the operations finish before then (unconfirmed, just a theory). Kicking them in OnClose surely fixed the issue for me. My servers shutdown within 3 seconds every time.