From c2170bef8c87a3002fb72b473c18c8da53e33216 Mon Sep 17 00:00:00 2001 From: poppingmoon <63451158+poppingmoon@users.noreply.github.com> Date: Wed, 11 Dec 2024 05:09:36 +0900 Subject: [PATCH] =?UTF-8?q?complete=E3=82=92=E8=A4=87=E6=95=B0=E5=9B=9E?= =?UTF-8?q?=E5=91=BC=E3=81=B0=E3=81=AA=E3=81=84=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/streaming_test.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/streaming_test.dart b/test/streaming_test.dart index 79b200a..2a6f1ce 100644 --- a/test/streaming_test.dart +++ b/test/streaming_test.dart @@ -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) {