Host migration is the act of transferring the Relay host role from one player to another.
Relay doesn't have any method to migrate the host role when a host player disconnects from the Relay server. If the host player disconnects from the Relay server, Relay ends the host player’s allocation and disconnects the remaining players.
However, you can add custom logic to your game to migrate the Relay host role to another player if the original host player disconnects. The logic might include a workflow similar to the following:
- Detect if the host player disconnects prematurely.
- Place the remaining players in a lobby.
- Select one of the remaining players to fill the host role.
- Start a new Relay allocation.
Note: Also see Lobby host migration.