Skip to content

Commit 076bddd

Browse files
committed
No need to set an exception when a channel shutdown was explicitly requested
1 parent 37c36bc commit 076bddd

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

projects/RabbitMQ.Client/client/impl/AsyncRpcContinuations.cs

+9-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ public AsyncRpcContinuation(TimeSpan continuationTimeout)
6868
// What to do if setting a result fails?
6969
public abstract void HandleCommand(in IncomingCommand cmd);
7070

71-
public void HandleChannelShutdown(ShutdownEventArgs reason) => _tcs.SetException(new OperationInterruptedException(reason));
71+
public virtual void HandleChannelShutdown(ShutdownEventArgs reason)
72+
{
73+
_tcs.SetException(new OperationInterruptedException(reason));
74+
}
7275

7376
protected virtual void Dispose(bool disposing)
7477
{
@@ -258,6 +261,11 @@ public ChannelCloseAsyncRpcContinuation(TimeSpan continuationTimeout)
258261
{
259262
}
260263

264+
public override void HandleChannelShutdown(ShutdownEventArgs reason)
265+
{
266+
// Nothing to do here!
267+
}
268+
261269
public void OnConnectionShutdown(object sender, ShutdownEventArgs reason)
262270
{
263271
_tcs.TrySetResult(true);

0 commit comments

Comments
 (0)