diff --git a/lib/src/core/engine.dart b/lib/src/core/engine.dart index d46acc0f..42d1db76 100644 --- a/lib/src/core/engine.dart +++ b/lib/src/core/engine.dart @@ -1037,7 +1037,8 @@ class Engine extends Disposable with EventsEmittable { return; } await signalClient.cleanUp(); - await cleanUp(); + fullReconnectOnNext = false; + await disconnect(); events .emit(EngineDisconnectedEvent(reason: event.reason.toSDKType())); break; diff --git a/lib/src/core/room.dart b/lib/src/core/room.dart index ab44cc8a..201e12c2 100644 --- a/lib/src/core/room.dart +++ b/lib/src/core/room.dart @@ -518,12 +518,7 @@ class Room extends DisposableChangeNotifier with EventsEmittable { notifyListeners(); }) ..on((event) async { - if (!engine.fullReconnectOnNext && - ![ - DisconnectReason.signalingConnectionFailure, - DisconnectReason.joinFailure, - DisconnectReason.noInternetConnection - ].contains(event.reason)) { + if (!engine.fullReconnectOnNext) { await _cleanUp(); events.emit(RoomDisconnectedEvent(reason: event.reason)); notifyListeners();