e2e: fix resume/full-reconnect. (#194)

* fix: full re-connect.

* chore: Reset fullReConnect state after ConnectionState is emitted.

* Support full reconnect, fix Migration, NodeFailure, FullReconnect test cases.

* revert Timeouts.connection.

* update.

* Refactor the resume/reconnect implementation.

* more changes.

* update.

* Changed to simpler reconnect/recovery logic.

* update.

* update.

* code format.

* tidy.

* bump version for flutter-webrtc.

* chore: Remove unused exception class (SignalReconnectError).

* chore: rename `fullReconnectOnNext` to `fullReconnect`.

* update.

* chore: Revert changes for `unpublishTrack`.

* chore: Reconnect signalClient when resumeConnection.

* revert `rethrow` in engine.connect.

* Use removePublishedTrack instead of unpublishTrack (RemoteParticipant).

* chore: Correctly handle PeerConnectionState for resume/full-reconnect.

* tidy.
This commit is contained in:
CloudWebRTC
2022-11-08 16:06:09 +08:00
committed by GitHub
parent 9b0f0604e1
commit 0d8441ebfb
17 changed files with 300 additions and 144 deletions
+5
View File
@@ -35,6 +35,10 @@ class SignalClient extends Disposable with EventsEmittable<SignalEvent> {
Duration? _pingIntervalDuration;
Timer? _pingIntervalTimer;
int get pingCount => _pingCount;
int _pingCount = 0;
@internal
SignalClient(WebSocketConnector wsConnector) : _wsConnector = wsConnector {
events.listen((event) {
@@ -240,6 +244,7 @@ class SignalClient extends Disposable with EventsEmittable<SignalEvent> {
logger.info('signal message not set');
break;
case lk_rtc.SignalResponse_Message.pong:
_pingCount++;
_resetPingTimeout();
break;
default: