Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question My server restarts after I manually quit the application, I don't understand why.

Discussion in 'Game Server Hosting' started by BSimonSweet, Jun 21, 2023.

  1. BSimonSweet

    BSimonSweet

    Joined:
    Aug 17, 2022
    Posts:
    55
    I'm trying Multiplay and I'm facing a weird behaviour : I'm listening to the event
    MultiplayEventCallbacks.Deallocate
    , and in the callback I close the server by calling
    Application.Quit()
    . To trigger that, I deallocate the test allocation.

    The server closes correctly, but Multiplay will then restarts it and I don't understand why it happens. In the "Events" section of the server, I have this message : "Binary exited with code 0, restarting server".

    When the app returns a code 0, it means that it properly terminated, and the documentation states that Multiplay will deallocated the slot, etc. (https://docs.unity.com/game-server-hosting/manual/concepts/server-lifecycle#intentional-exits)

    Am I doing something wrong ?
     
  2. BSimonSweet

    BSimonSweet

    Joined:
    Aug 17, 2022
    Posts:
    55