Skip to content

Commit

Permalink
エラー時の処理を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
shiosyakeyakini-info committed Oct 18, 2024
1 parent 90d0aa0 commit 353fa08
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/src/services/streaming_service_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand All @@ -145,6 +151,7 @@ class StreamingService implements StreamingController, WebSocketController {
} finally {
_subscription = null;
_webSocketChannel = null;
_subNotes.clear();
}
}

Expand Down

0 comments on commit 353fa08

Please sign in to comment.