Skip to content

Commit

Permalink
completeを複数回呼ばないように
Browse files Browse the repository at this point in the history
  • Loading branch information
poppingmoon committed Dec 10, 2024
1 parent c4979dc commit c2170be
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/streaming_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,11 @@ void main() async {
final id = DateTime.now().toIso8601String();
final listener = controller.mainStream(id: id).listen((event) {
final body = event.body;
if (body is ReadAllAnnouncementsChannelEvent) completer.complete();
if (body is ReadAllAnnouncementsChannelEvent) {
if (!completer.isCompleted) {
completer.complete();
}
}
});
await Future.wait(
announcements.map((announcement) {
Expand Down

0 comments on commit c2170be

Please sign in to comment.