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
14 changes: 14 additions & 0 deletions projects/RabbitMQ.Client/Impl/AutorecoveringConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,20 @@ public async ValueTask DisposeAsync()
return;
}

try
{
#if NETSTANDARD2_0
_recoveryCancellationTokenSource.Cancel();
#else
await _recoveryCancellationTokenSource.CancelAsync()
.ConfigureAwait(false);
#endif
}
catch
{
// Ensure dispose does not throw any exceptions.
}

try
{
await _innerConnection.DisposeAsync()
Expand Down