Skip to content

Commit 7057fd5

Browse files
committed
fixup
1 parent 38527ff commit 7057fd5

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Diff for: projects/RabbitMQ.Client/client/impl/AutorecoveringChannel.cs

+12-2
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,21 @@ await _connection.RecoverConsumersAsync(this, newChannel, recordedEntitiesSemaph
200200
_innerChannel.RunRecoveryEventHandlers(this);
201201
}
202202

203-
public Task CloseAsync(ushort replyCode, string replyText, bool abort,
203+
public async Task CloseAsync(ushort replyCode, string replyText, bool abort,
204204
CancellationToken cancellationToken)
205205
{
206206
ThrowIfDisposed();
207-
return _innerChannel.CloseAsync(replyCode, replyText, abort, cancellationToken);
207+
try
208+
{
209+
await _innerChannel.CloseAsync(replyCode, replyText, abort, cancellationToken)
210+
.ConfigureAwait(false);
211+
}
212+
finally
213+
{
214+
await _connection.DeleteRecordedChannelAsync(this,
215+
channelsSemaphoreHeld: false, recordedEntitiesSemaphoreHeld: false)
216+
.ConfigureAwait(false);
217+
}
208218
}
209219

210220
public async Task CloseAsync(ShutdownEventArgs args, bool abort,

0 commit comments

Comments
 (0)