question

mattdavidson2017 avatar image
mattdavidson2017 asked

Game servers are not stopping

My game servers in Multiplayer 2.0 are not stopping with no players connected. I don't see an option to terminate the Vm and I am unable to delete the build as it gives me a 400 error. Is there another way to terminate the VM if the application doesn't end as expected?

Custom Game Servers
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brandon@uprootstudios.com avatar image
brandon@uprootstudios.com answered

@mattdavidson2017 You need to make sure you have logic in your server that terminates the application when all players disconnect / the game is over. Here's an example if you're using Unity:

public void OnPlayerDisconnect(Player p) {
    serverPlayers.Remove(p);

    if (serverPlayers.Count == 0) {
        GameOver();
    }
}


public void GameOver() {
    Application.Quit();
}

If you have logic like this and for some reason your server did not terminate as expected, or you want to terminate a server manually, you can use the ShutdownMultiplayerServer API. If you want a quick way to do this, I wrote an application with that API that you can use to do this (link). Just select Server Info > (Select Server) > (Select Session) > End Session.

Furthermore, if you're unable to delete a build, first make sure that the build is not being used in any Matchmaking Queues. Once it's removed from any matchmaking queues, you should be able to delete the build even if servers are running.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

mattdavidson2017 avatar image mattdavidson2017 commented ·

I'm trying out your application and my screen is stuck on loading, even when I restart it. I'm guessing it stores my credentials, anyway to reset this and try logging in again?

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.