When the host of a lobby disconnects, the Lobby service selects another player at random to become the new host. By default, there is no notification sent to the other players that the host has changed. Instead, developers must implement a function that checks who the new host is by comparing hostIDs to playerIDs, and configuring the new host to adopt host functionality.
As an alternative, the hostID field of the lobby data can be set manually by the current host to elect a new host before disconnection. However, this solution does not work in cases of unexpected disconnection.
While the specific functions of the host depend on your application, it’s important to remember that this new host must resume the heartbeating to the Lobby service to keep the lobby active.
Please sign in to leave a comment.