From 353fa089ce860d95a303bd4ef66d810320dfd84e Mon Sep 17 00:00:00 2001 From: sorairo Date: Fri, 18 Oct 2024 11:19:55 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=A8=E3=83=A9=E3=83=BC=E6=99=82=E3=81=AE?= =?UTF-8?q?=E5=87=A6=E7=90=86=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/src/services/streaming_service_impl.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/src/services/streaming_service_impl.dart b/lib/src/services/streaming_service_impl.dart index 34ce4ca..6c7b1ae 100644 --- a/lib/src/services/streaming_service_impl.dart +++ b/lib/src/services/streaming_service_impl.dart @@ -125,6 +125,12 @@ class StreamingService implements StreamingController, WebSocketController { if (retryCounts < maxRetryCounts) { await _reconnect(retryCounts: retryCounts + 1); } else { + _subNotes.clear(); + try { + await _close(); + } catch (e) { + print(e); + } rethrow; } } @@ -145,6 +151,7 @@ class StreamingService implements StreamingController, WebSocketController { } finally { _subscription = null; _webSocketChannel = null; + _subNotes.clear(); } }