Skip to content

Commit

Permalink
[#258] AmqpTransportInitiator.Complete is throwing a NullReferenceExc…
Browse files Browse the repository at this point in the history
…eption
  • Loading branch information
xinchen10 committed May 3, 2024
1 parent e7d70fe commit e746169
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Microsoft.Azure.Amqp/Amqp/Transport/AmqpTransportInitiator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,12 @@ void Complete(TransportAsyncCallbackArgs args)
{
if (args.Exception != null && args.Transport != null)
{
args.Transport.SafeClose(args.Exception);
args.Transport = null;
if (args.Exception is ObjectDisposedException)
{
args.Exception = new IOException(AmqpResources.GetString(AmqpResources.AmqpTransportClosed, args.Transport.ToString()));
}
args.Transport.SafeClose(args.Exception);
args.Transport = null;
}

TransportAsyncCallbackArgs innerArgs = (TransportAsyncCallbackArgs)args.UserToken;
Expand Down

0 comments on commit e746169

Please sign in to comment.