Skip to content

Commit 69a4201

Browse files
committed
1 parent 095988f commit 69a4201

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

projects/RabbitMQ.Client/client/impl/ChannelBase.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,11 @@ private void OnSessionShutdown(object sender, ShutdownEventArgs reason)
471471

472472
internal bool SetCloseReason(ShutdownEventArgs reason)
473473
{
474+
if (reason is null)
475+
{
476+
throw new ArgumentNullException(nameof(reason));
477+
}
478+
474479
// NB: this ensures that Close is only called once on a channel
475480
return Interlocked.CompareExchange(ref _closeReason, reason, null) is null;
476481
}

projects/RabbitMQ.Client/client/impl/SessionBase.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ public void Close(ShutdownEventArgs reason, bool notify)
111111
{
112112
RabbitMqClientEventSource.Log.ChannelClosed();
113113
}
114+
114115
if (notify)
115116
{
116117
OnSessionShutdown(CloseReason);
@@ -126,7 +127,7 @@ public void Notify()
126127
ShutdownEventArgs reason = CloseReason;
127128
if (reason is null)
128129
{
129-
throw new InvalidOperationException("Internal Error in Session.Close");
130+
throw new InvalidOperationException("Internal Error in SessionBase.Notify");
130131
}
131132

132133
OnSessionShutdown(reason);

projects/Test/Integration/TestConnectionRecoveryWithoutSetup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public async Task TestConsumerWorkServiceRecovery()
149149
[Fact]
150150
public async Task TestConsumerRecoveryOnClientNamedQueueWithOneRecovery()
151151
{
152-
string q0 = "dotnet-client.recovery.queue1";
152+
const string q0 = "dotnet-client.recovery.queue1";
153153
using (AutorecoveringConnection c = await CreateAutorecoveringConnectionAsync())
154154
{
155155
using (IChannel ch = await c.CreateChannelAsync())

0 commit comments

Comments
 (0)