Skip to content

Commit

Permalink
cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudwebrtc committed Dec 20, 2023
1 parent c5cac2f commit eff4dac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 37 deletions.
2 changes: 1 addition & 1 deletion lib/src/core/engine.dart
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ class Engine extends Disposable with EventsEmittable<EngineEvent> {
await events.waitFor<SignalReconnectedEvent>(
duration: connectOptions.timeouts.connection,
onTimeout: () => throw ConnectException(
'resumeConnection: Timed out waiting for EngineReconnectedEvent'),
'resumeConnection: Timed out waiting for SignalReconnectedEvent'),
);

events.emit(const EngineSignalResumedEvent());
Expand Down
37 changes: 1 addition & 36 deletions lib/src/core/room.dart
Original file line number Diff line number Diff line change
Expand Up @@ -396,47 +396,12 @@ class Room extends DisposableChangeNotifier with EventsEmittable<RoomEvent> {
})
..on<EngineReconnectingEvent>((event) async {
events.emit(const RoomReconnectingEvent());
})
..on<EngineReconnectingEvent>((event) async {
await _sendSyncState();
})
..on<EngineDisconnectedEvent>((event) async {
await _cleanUp();
events.emit(RoomDisconnectedEvent(reason: event.reason));
}) /*
..on<EngineConnectionStateUpdatedEvent>((event) async {
if (event.didReconnect) {
} else if (event.fullReconnect &&
event.newState == ConnectionState.connecting) {
events.emit(const RoomRestartingEvent());
// clean up RemoteParticipants
for (final participant in _participants.values) {
events.emit(ParticipantDisconnectedEvent(participant: participant));
await participant.dispose();
}
_participants.clear();
_activeSpeakers.clear();
// reset params
_name = null;
_sid = null;
_metadata = null;
_serverVersion = null;
_serverRegion = null;
} else if (event.fullReconnect &&
event.newState == ConnectionState.connected) {
events.emit(const RoomRestartedEvent());
await _handlePostReconnect(event.fullReconnect);
} else if (event.newState == ConnectionState.reconnecting) {
events.emit(const RoomReconnectingEvent());
} else if (event.newState == ConnectionState.disconnected) {
if (!event.fullReconnect) {
await _cleanUp();
events.emit(RoomDisconnectedEvent(reason: event.disconnectReason));
}
}
// always notify ChangeNotifier
notifyListeners();
})*/
})
..on<EngineActiveSpeakersUpdateEvent>(
(event) => _onEngineActiveSpeakersUpdateEvent(event.speakers))
..on<EngineDataPacketReceivedEvent>(_onDataMessageEvent)
Expand Down

0 comments on commit eff4dac

Please sign in to comment.