Skip to content

Commit

Permalink
* Try to figure out CI error here - https://github.com/rabbitmq/rabbi…
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebakken committed Feb 28, 2024
1 parent 095988f commit 69a4201
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions projects/RabbitMQ.Client/client/impl/ChannelBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,11 @@ private void OnSessionShutdown(object sender, ShutdownEventArgs reason)

internal bool SetCloseReason(ShutdownEventArgs reason)
{
if (reason is null)
{
throw new ArgumentNullException(nameof(reason));
}

// NB: this ensures that Close is only called once on a channel
return Interlocked.CompareExchange(ref _closeReason, reason, null) is null;
}
Expand Down
3 changes: 2 additions & 1 deletion projects/RabbitMQ.Client/client/impl/SessionBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ public void Close(ShutdownEventArgs reason, bool notify)
{
RabbitMqClientEventSource.Log.ChannelClosed();
}

if (notify)
{
OnSessionShutdown(CloseReason);
Expand All @@ -126,7 +127,7 @@ public void Notify()
ShutdownEventArgs reason = CloseReason;
if (reason is null)
{
throw new InvalidOperationException("Internal Error in Session.Close");
throw new InvalidOperationException("Internal Error in SessionBase.Notify");
}

OnSessionShutdown(reason);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public async Task TestConsumerWorkServiceRecovery()
[Fact]
public async Task TestConsumerRecoveryOnClientNamedQueueWithOneRecovery()
{
string q0 = "dotnet-client.recovery.queue1";
const string q0 = "dotnet-client.recovery.queue1";
using (AutorecoveringConnection c = await CreateAutorecoveringConnectionAsync())
{
using (IChannel ch = await c.CreateChannelAsync())
Expand Down

0 comments on commit 69a4201

Please sign in to comment.