Skip to content

Commit 13ec023

Browse files
committed
Propagate value task
1 parent d769508 commit 13ec023

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -459,13 +459,14 @@ protected ValueTask ModelSendAsync<TMethod, THeader>(in TMethod method, in THead
459459
}
460460

461461
[MethodImpl(MethodImplOptions.AggressiveInlining)]
462-
protected async Task FlowControlAsync(CancellationToken cancellationToken)
462+
protected ValueTask FlowControlAsync(CancellationToken cancellationToken)
463463
{
464-
if (!_flowControlBlock.IsSet)
464+
if (_flowControlBlock.IsSet)
465465
{
466-
await _flowControlBlock.WaitAsync(cancellationToken)
467-
.ConfigureAwait(false);
466+
return new ValueTask();
468467
}
468+
469+
return _flowControlBlock.WaitAsync(cancellationToken);
469470
}
470471

471472
internal Task OnCallbackExceptionAsync(CallbackExceptionEventArgs args)

0 commit comments

Comments
 (0)