diff --git a/livekit-android-sdk/src/main/java/io/livekit/android/room/RTCEngine.kt b/livekit-android-sdk/src/main/java/io/livekit/android/room/RTCEngine.kt index c3576151..e485aca3 100644 --- a/livekit-android-sdk/src/main/java/io/livekit/android/room/RTCEngine.kt +++ b/livekit-android-sdk/src/main/java/io/livekit/android/room/RTCEngine.kt @@ -313,7 +313,14 @@ internal constructor( if (newState.isConnected()) { connectionState = ConnectionState.CONNECTED } else if (newState.isDisconnected()) { - connectionState = ConnectionState.DISCONNECTED + // Only transition to DISCONNECTED when not already in a reconnection + // intermediate state (RESUMING/RECONNECTING). In those states the + // reconnect flow owns connectionState; overwriting it here would + // silently swallow the disconnect and prevent the app from being notified. + val current = connectionState + if (current != ConnectionState.RESUMING && current != ConnectionState.RECONNECTING) { + connectionState = ConnectionState.DISCONNECTED + } } }