Skip to content

Commit b65021a

Browse files
committed
Pattern merge instead of if
1 parent 3459cb9 commit b65021a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

projects/RabbitMQ.Client/client/impl/AutorecoveringConnection.Recovery.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ static bool ShouldTriggerConnectionRecovery(ShutdownEventArgs args)
7777
* https://github.com/rabbitmq/rabbitmq-dotnet-client/issues/826
7878
* Happens when an AppDomain is unloaded
7979
*/
80-
if (args.Exception is ThreadAbortException &&
81-
args.ReplyCode == Constants.InternalError)
80+
if (args is { Exception: ThreadAbortException, ReplyCode: Constants.InternalError })
8281
{
8382
return false;
8483
}

0 commit comments

Comments
 (0)