Skip to content

Commit

Permalink
Merge pull request Azure#65 from Azure/alextolp/amqpwsaddlogs
Browse files Browse the repository at this point in the history
Add logs for amqp ws tpm
  • Loading branch information
alextolp authored and Cristian Pop committed Oct 8, 2018
1 parent ef85c47 commit 654a8cc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion provisioning/transport/amqp/src/AmqpClientConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,14 @@ public async Task OpenAsync(TimeSpan timeout, bool useWebSocket, X509Certificate
args.SetBuffer(buffer.Buffer, buffer.Offset, buffer.Length);
args.CompletedCallback = OnWriteHeaderComplete;
args.Transport = transport;
transport.WriteAsync(args);
bool writeAsyncResult = transport.WriteAsync(args);

if (Logging.IsEnabled) Logging.Info(this, $"{nameof(AmqpClientConnection)}.{nameof(OpenAsync)}: Sent Protocol Header: {_sentHeader.ToString()} writeAsyncResult: {writeAsyncResult} completedSynchronously: {args.CompletedSynchronously}");

if (args.CompletedSynchronously)
{
args.CompletedCallback(args);
}

_tcs = new TaskCompletionSource<TransportBase>();
transport = await _tcs.Task.ConfigureAwait(false);
Expand Down

0 comments on commit 654a8cc

Please sign in to comment.