Skip to content

Commit

Permalink
Rename ClosedViaPeer to ClosedViaPeerAsync
Browse files Browse the repository at this point in the history
Rename `OnShutdown` to `OnShutdownAsync`
  • Loading branch information
lukebakken committed Sep 17, 2024
1 parent 275134e commit 213f0da
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion projects/RabbitMQ.Client/client/impl/ChannelBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ protected async Task<bool> HandleConnectionCloseAsync(IncomingCommand cmd, Cance
var reason = new ShutdownEventArgs(ShutdownInitiator.Peer, method._replyCode, method._replyText, method._classId, method._methodId);
try
{
await Session.Connection.ClosedViaPeer(reason)
await Session.Connection.ClosedViaPeerAsync(reason)
.ConfigureAwait(false);

var replyMethod = new ConnectionCloseOk();
Expand Down
4 changes: 2 additions & 2 deletions projects/RabbitMQ.Client/client/impl/Connection.Receive.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ private async Task HandleMainLoopExceptionAsync(ShutdownEventArgs reason)

_channel0.MaybeSetConnectionStartException(reason.Exception!);

await OnShutdown(reason).ConfigureAwait(false);
await OnShutdownAsync(reason).ConfigureAwait(false);
LogCloseError($"unexpected connection closure: {message}", reason.Exception!);
}

Expand All @@ -227,7 +227,7 @@ private async Task HardProtocolExceptionHandlerAsync(HardProtocolException hpe,
{
if (SetCloseReason(hpe.ShutdownReason))
{
await OnShutdown(hpe.ShutdownReason).ConfigureAwait(false);
await OnShutdownAsync(hpe.ShutdownReason).ConfigureAwait(false);
await _session0.SetSessionClosingAsync(false)
.ConfigureAwait(false);
try
Expand Down
8 changes: 4 additions & 4 deletions projects/RabbitMQ.Client/client/impl/Connection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ internal async Task CloseAsync(ShutdownEventArgs reason, bool abort, TimeSpan ti
{
cancellationToken.ThrowIfCancellationRequested();

await OnShutdown(reason)
await OnShutdownAsync(reason)
.ConfigureAwait(false);
await _session0.SetSessionClosingAsync(false)
.ConfigureAwait(false);
Expand Down Expand Up @@ -409,7 +409,7 @@ await _frameHandler.CloseAsync(cancellationToken)
}
}

internal async Task ClosedViaPeer(ShutdownEventArgs reason)
internal async Task ClosedViaPeerAsync(ShutdownEventArgs reason)
{
if (false == SetCloseReason(reason))
{
Expand All @@ -420,7 +420,7 @@ internal async Task ClosedViaPeer(ShutdownEventArgs reason)
// We are quiescing, but still allow for server-close
}

await OnShutdown(reason)
await OnShutdownAsync(reason)
.ConfigureAwait(false);
await _session0.SetSessionClosingAsync(true)
.ConfigureAwait(false);
Expand All @@ -441,7 +441,7 @@ private async Task FinishCloseAsync(CancellationToken cancellationToken)
}

///<summary>Broadcasts notification of the final shutdown of the connection.</summary>
private Task OnShutdown(ShutdownEventArgs reason)
private Task OnShutdownAsync(ShutdownEventArgs reason)
{
ThrowIfDisposed();
return _connectionShutdownAsyncWrapper.InvokeAsync(this, reason);
Expand Down

0 comments on commit 213f0da

Please sign in to comment.