feat: Forward leave reason of disconnected events. (#250)

* feat: Forward leave reason of disconnected events.

* fix analyze.

* chore: print room disconnect reason when event.reason != null.

* chore: rename InternalDisconnectReason => ClientDisconnectReason.
This commit is contained in:
CloudWebRTC
2023-03-07 17:54:18 +08:00
committed by GitHub
parent db2e25d424
commit c74e6777d8
9 changed files with 66 additions and 22 deletions
+1 -1
View File
@@ -314,7 +314,7 @@ class Room extends DisposableChangeNotifier with EventsEmittable<RoomEvent> {
} else if (event.newState == ConnectionState.disconnected) {
if (!event.fullReconnect) {
await _cleanUp();
events.emit(const RoomDisconnectedEvent());
events.emit(RoomDisconnectedEvent(reason: event.disconnectReason));
}
}
// always notify ChangeNotifier