Skip to content

Commit 38527ff

Browse files
committed
Fix ShutdownInitiator in CloseAsync
`AutorecoveringChannel` `CloseAsync` should just call `_innerChannel.CloseAsync`
1 parent e52d703 commit 38527ff

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,7 @@ public Task CloseAsync(ushort replyCode, string replyText, bool abort,
204204
CancellationToken cancellationToken)
205205
{
206206
ThrowIfDisposed();
207-
var args = new ShutdownEventArgs(ShutdownInitiator.Library, replyCode, replyText);
208-
return CloseAsync(args, abort, cancellationToken);
207+
return _innerChannel.CloseAsync(replyCode, replyText, abort, cancellationToken);
209208
}
210209

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

Diff for: projects/Test/Applications/MassPublish/Program.cs

+1
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ await publishChannel.BasicPublishAsync(exchange: ExchangeName, routingKey: Routi
156156
}
157157

158158
await consumeChannel.CloseAsync();
159+
await consumeConnection.CloseAsync();
159160
}
160161

161162
private static void PublishChannel_BasicNacks(object sender, BasicNackEventArgs e)

0 commit comments

Comments
 (0)