Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebakken committed May 1, 2024
1 parent 87fa5ad commit 8e84d74
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ if ($RunTests)
dotnet test $csproj_file --environment 'RABBITMQ_LONG_RUNNING_TESTS=true' --no-restore --no-build --logger "console;verbosity=detailed"
if ($LASTEXITCODE -ne 0)
{
Write-Host "[WARNING] tests errored, exiting" -Foreground "Red"
Write-Host "[ERROR] tests errored, exiting" -Foreground "Red"
Exit 1
}
else
{
Expand Down
1 change: 1 addition & 0 deletions projects/RabbitMQ.Client/client/impl/Connection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ private async Task FinishCloseAsync(CancellationToken cancellationToken)

await _frameHandler.CloseAsync(cancellationToken)
.ConfigureAwait(false);

_channel0.SetCloseReason(CloseReason);

await _channel0.FinishCloseAsync()
Expand Down
5 changes: 3 additions & 2 deletions projects/Test/Common/IntegrationFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,13 @@ public virtual async Task DisposeAsync()
{
try
{
if (_channel != null)
if (_conn != null && _conn.IsOpen &&
_channel != null && _channel.IsOpen)
{
await _channel.CloseAsync();
}

if (_conn != null)
if (_conn != null && _conn.IsOpen)
{
await _conn.CloseAsync();
}
Expand Down
3 changes: 1 addition & 2 deletions projects/Test/Integration/TestConnectionShutdown.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ public async Task TestDisposedWithSocketClosedOutOfBand()
_conn.Dispose();
_conn = null;

TimeSpan waitSpan = TimeSpan.FromSeconds(10);
await WaitAsync(tcs, waitSpan, "channel shutdown");
await WaitAsync(tcs, TimeSpan.FromSeconds(10), "channel shutdown");
}

[Fact]
Expand Down

0 comments on commit 8e84d74

Please sign in to comment.