Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1015,10 +1015,11 @@ internal async Task<DateTimeOffset> RenewSessionLockInternal(TimeSpan timeout)
// Create an AmqpRequest Message to renew lock
var amqpRequestMessage = AmqpRequestMessage.CreateRequest(ManagementConstants.Operations.RenewSessionLockOperation, timeout, null);

if (_receiveLink.TryGetOpenedObject(out var receiveLink))
if (!_receiveLink.TryGetOpenedObject(out ReceivingAmqpLink receiveLink))
{
amqpRequestMessage.AmqpMessage.ApplicationProperties.Map[ManagementConstants.Request.AssociatedLinkName] = receiveLink.Name;
receiveLink = await _receiveLink.GetOrCreateAsync(UseMinimum(_connectionScope.SessionTimeout, timeout)).ConfigureAwait(false);
}
amqpRequestMessage.AmqpMessage.ApplicationProperties.Map[ManagementConstants.Request.AssociatedLinkName] = receiveLink.Name;

amqpRequestMessage.Map[ManagementConstants.Properties.SessionId] = SessionId;

Expand Down