From 533023f028ebf6db2157e102999e5545858625a2 Mon Sep 17 00:00:00 2001 From: Muzzammil Shahid Date: Wed, 16 Oct 2024 15:44:37 +0500 Subject: [PATCH 1/2] Save publish request only if acknowledgment is true --- lib/src/session.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/src/session.dart b/lib/src/session.dart index a771eaa..7364976 100644 --- a/lib/src/session.dart +++ b/lib/src/session.dart @@ -208,12 +208,13 @@ class Session { }) { var publish = msg.Publish(_nextID, topic, args: args, kwargs: kwargs, options: options); - var completer = Completer(); - _publishRequests[publish.requestID] = completer; _baseSession.send(_wampSession.sendMessage(publish)); var ack = options?["acknowledge"] ?? false; if (ack) { + var completer = Completer(); + _publishRequests[publish.requestID] = completer; + return completer.future; } From 261f86cad9b79acb01c7ce4db1d406917bb2370e Mon Sep 17 00:00:00 2001 From: Muzzammil Shahid Date: Wed, 16 Oct 2024 15:47:56 +0500 Subject: [PATCH 2/2] Update dart sdk version in CI --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 2794721..a0d07b6 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -17,7 +17,7 @@ jobs: - name: Set up Dart uses: dart-lang/setup-dart@v1 with: - sdk: 3.3.0 + sdk: 3.4.0 - name: Install dependencies run: make install