Skip to content

Commit 1b0c47a

Browse files
committed
Propagate value task
1 parent 5f70854 commit 1b0c47a

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
@@ -458,13 +458,14 @@ protected ValueTask ModelSendAsync<TMethod, THeader>(in TMethod method, in THead
458458
}
459459

460460
[MethodImpl(MethodImplOptions.AggressiveInlining)]
461-
protected async Task FlowControlAsync(CancellationToken cancellationToken)
461+
protected ValueTask FlowControlAsync(CancellationToken cancellationToken)
462462
{
463-
if (!_flowControlBlock.IsSet)
463+
if (_flowControlBlock.IsSet)
464464
{
465-
await _flowControlBlock.WaitAsync(cancellationToken)
466-
.ConfigureAwait(false);
465+
return new ValueTask();
467466
}
467+
468+
return _flowControlBlock.WaitAsync(cancellationToken);
468469
}
469470

470471
internal void OnCallbackException(CallbackExceptionEventArgs args)

0 commit comments

Comments
 (0)