game-common / pragma.gameinstance / GameInstancePlugin / onGameServerDisconnected /

onGameServerDisconnected #

open suspend fun onGameServerDisconnected(gameInstanceSnapshot: GameInstance.GameInstance)

Called when a game server disconnects.

A game server disconnects when it does not send a GameInstanceRpc.GameKeepAliveV1Request within the timeout defined by GameInstanceServiceConfig.keepAliveMissesLimit and GameInstanceServiceConfig.keepAliveIntervalMillis. This only occurs if GameInstanceServiceConfig.enableKeepAlive is enabled.

Default implementation: terminates the game instance.

Parameters #

gameInstanceSnapshot

The game instance whose linked game server disconnected.