Skip to content

On Reconnecting

Fired when the SDK detects a connection drop and begins automatically attempting to restore the session. No user action is required — show a "reconnecting" indicator in your UI.

Event Registration

fun setReconnectingListener(
  fn: () -> Unit
): Subscription

Usage Example

 client.setReconnectingListener {
     println("Session Reconnecting")
 }

Event Data

This event carries no parameters.

Notes

  • The SDK automatically attempts to reconnect when the underlying WebSocket connection drops
  • Show a reconnecting indicator in your UI when this event fires
  • Successful reconnection is indicated by onReconnection
  • If reconnection fails, onSessionError fires instead

Built with VitePress.