livekit / client-sdk-flutter

Flutter Client SDK for LiveKit
https://docs.livekit.io
Apache License 2.0
261 stars 132 forks source link

[bug]RoomDisconnectedEvent Triggered Twice with Different Reasons #626

Open AoEiuV020 opened 2 days ago

AoEiuV020 commented 2 days ago

Describe the bug I encountered an issue where the RoomDisconnectedEvent is triggered twice with different reasons when calling room.disconnect().

To Reproduce

Steps to reproduce: run example app, Navigate to the room page. Click the button to disconnect, which calls room.disconnect(). Expected behavior The RoomDisconnectedEvent should only be triggered once upon disconnection, with a consistent event.reason.

Observed behavior The RoomDisconnectedEvent is triggered twice, with each instance showing a different reason: First event: DisconnectReason.disconnected Second event: DisconnectReason.clientInitiated

Platform information

AoEiuV020 commented 2 days ago

The server in use is the official LiveKit demo: https://meet.livekit.io/