activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From michaelpea...@apache.org
Subject [activemq-nms-amqp] branch master updated: AMQNET-598: Session Acknowledge awaiter should be unwrapped
Date Mon, 12 Aug 2019 13:23:56 GMT
This is an automated email from the ASF dual-hosted git repository.

michaelpearce pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-nms-amqp.git


The following commit(s) were added to refs/heads/master by this push:
     new 3b0cce7  AMQNET-598: Session Acknowledge awaiter should be unwrapped
     new 754c20e  Merge pull request #17 from Havret/AMQNET-598
3b0cce7 is described below

commit 3b0cce7336812048927994df42dfd5d8f21ec4f3
Author: Havret <h4vret@gmail.com>
AuthorDate: Sun Aug 11 23:10:27 2019 +0200

    AMQNET-598: Session Acknowledge awaiter should be unwrapped
---
 src/NMS.AMQP/NmsConnection.cs | 5 ++---
 src/NMS.AMQP/NmsSession.cs    | 4 ++--
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/NMS.AMQP/NmsConnection.cs b/src/NMS.AMQP/NmsConnection.cs
index 307ebed..58961dd 100644
--- a/src/NMS.AMQP/NmsConnection.cs
+++ b/src/NMS.AMQP/NmsConnection.cs
@@ -458,7 +458,6 @@ namespace Apache.NMS.AMQP
                     try
                     {
                         provider.Connect(ConnectionInfo).ConfigureAwait(false).GetAwaiter().GetResult();
-                    
                     }
                     catch (Exception e)
                     {
@@ -496,9 +495,9 @@ namespace Apache.NMS.AMQP
             connectionListeners.Add(listener);
         }
 
-        public void Acknowledge(Id sessionId, AckType ackType)
+        internal Task Acknowledge(Id sessionId, AckType ackType)
         {
-            provider.Acknowledge(sessionId, ackType);
+            return provider.Acknowledge(sessionId, ackType);
         }
 
         internal Task Acknowledge(InboundMessageDispatch envelope, AckType ackType)
diff --git a/src/NMS.AMQP/NmsSession.cs b/src/NMS.AMQP/NmsSession.cs
index 40432e3..5459a89 100644
--- a/src/NMS.AMQP/NmsSession.cs
+++ b/src/NMS.AMQP/NmsSession.cs
@@ -298,7 +298,7 @@ namespace Apache.NMS.AMQP
 
         public void Acknowledge(AckType ackType)
         {
-            Connection.Acknowledge(SessionInfo.Id, ackType);
+            Connection.Acknowledge(SessionInfo.Id, ackType).ConfigureAwait(false).GetAwaiter().GetResult();
         }
 
         public void Acknowledge(AckType ackType, InboundMessageDispatch envelope)
@@ -313,7 +313,7 @@ namespace Apache.NMS.AMQP
                 throw new IllegalStateException("Message acknowledge called inside a transacted
Session");
             }
 
-            Connection.Acknowledge(envelope, ackType);
+            Connection.Acknowledge(envelope, ackType).ConfigureAwait(false).GetAwaiter().GetResult();
         }
 
         public void Send(NmsMessageProducer producer, IDestination destination, IMessage
original, MsgDeliveryMode deliveryMode,


Mime
View raw message