From 943046afc61d518c301d50dc6a90f6c8df0d80f4 Mon Sep 17 00:00:00 2001 From: Rajeev Vokkarne Date: Tue, 21 Aug 2018 15:55:06 -0700 Subject: [PATCH 1/2] Update TlsTransport.cs Make Sslstream a protected member so that derived classes can get access to it. --- Microsoft.Azure.Amqp/Amqp/Transport/TlsTransport.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Microsoft.Azure.Amqp/Amqp/Transport/TlsTransport.cs b/Microsoft.Azure.Amqp/Amqp/Transport/TlsTransport.cs index 0727e617..69c593c1 100644 --- a/Microsoft.Azure.Amqp/Amqp/Transport/TlsTransport.cs +++ b/Microsoft.Azure.Amqp/Amqp/Transport/TlsTransport.cs @@ -14,7 +14,7 @@ public class TlsTransport : TransportBase, IDisposable static readonly AsyncCallback onWriteComplete = OnWriteComplete; static readonly AsyncCallback onReadComplete = OnReadComplete; readonly TransportBase innerTransport; - readonly CustomSslStream sslStream; + protected readonly CustomSslStream sslStream; TlsTransportSettings tlsSettings; OperationState writeState; OperationState readState; From bfab436b2ee3f9e629babdecd7f7184accd5339f Mon Sep 17 00:00:00 2001 From: Neeraj Makam Date: Wed, 29 Aug 2018 11:58:49 -0700 Subject: [PATCH 2/2] Passing timeout value for DisposeAsyncResult (#115) * Passing timeout value for DisposeAsyncResult. * Minor changes --- Microsoft.Azure.Amqp/Amqp/ReceivingAmqpLink.cs | 17 +++++++++++++++-- .../Microsoft.Azure.Amqp.csproj | 1 + Microsoft.Azure.Amqp/Properties/Version.cs | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/Microsoft.Azure.Amqp/Amqp/ReceivingAmqpLink.cs b/Microsoft.Azure.Amqp/Amqp/ReceivingAmqpLink.cs index 0baa2389..7e60ec61 100644 --- a/Microsoft.Azure.Amqp/Amqp/ReceivingAmqpLink.cs +++ b/Microsoft.Azure.Amqp/Amqp/ReceivingAmqpLink.cs @@ -741,7 +741,7 @@ static void OnTimer(object state) } } - sealed class DisposeAsyncResult : AsyncResult, IWork + sealed class DisposeAsyncResult : TimeoutAsyncResult, IWork { readonly ReceivingAmqpLink link; readonly ArraySegment deliveryTag; @@ -758,7 +758,7 @@ public DisposeAsyncResult( TimeSpan timeout, AsyncCallback callback, object state) - : base(callback, state) + : base(timeout, callback, state) { this.link = link; this.deliveryTag = deliveryTag; @@ -775,6 +775,7 @@ public static Outcome End(IAsyncResult result) public void Start() { + this.SetTimer(); DeliveryState deliveryState; if (txnId.Array != null) { @@ -821,6 +822,18 @@ public void Cancel(bool completedSynchronously, Exception exception) { this.Complete(completedSynchronously, exception); } + + protected override string Target + { + get { return "dispose"; } + } + + protected override void CompleteOnTimer() + { + // Timeout + this.link.pendingDispositions.CompleteWork(this.deliveryTag, true, AmqpConstants.RejectedOutcome); + base.CompleteOnTimer(); + } } /// diff --git a/Microsoft.Azure.Amqp/Microsoft.Azure.Amqp.csproj b/Microsoft.Azure.Amqp/Microsoft.Azure.Amqp.csproj index 754e7eae..027a91a0 100644 --- a/Microsoft.Azure.Amqp/Microsoft.Azure.Amqp.csproj +++ b/Microsoft.Azure.Amqp/Microsoft.Azure.Amqp.csproj @@ -22,6 +22,7 @@ false false Debug;Release;Signed + true diff --git a/Microsoft.Azure.Amqp/Properties/Version.cs b/Microsoft.Azure.Amqp/Properties/Version.cs index 452ea807..1a3d23b8 100644 --- a/Microsoft.Azure.Amqp/Properties/Version.cs +++ b/Microsoft.Azure.Amqp/Properties/Version.cs @@ -3,4 +3,4 @@ using System.Runtime.InteropServices; [assembly: AssemblyVersion("2.3.0.0")] -[assembly: AssemblyInformationalVersion("2.3.2")] +[assembly: AssemblyInformationalVersion("2.3.3")]