Skip to content

Commit 27bc906

Browse files
committed
fixup
1 parent 0c35b34 commit 27bc906

File tree

1 file changed

+16
-20
lines changed

1 file changed

+16
-20
lines changed

projects/RabbitMQ.Client/Impl/ChannelBase.cs

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -386,20 +386,18 @@ await _rpcSemaphore.WaitAsync(k.CancellationToken)
386386
try
387387
{
388388
enqueued = Enqueue(k);
389-
if (enqueued)
390-
{
391-
var method = new ChannelOpen();
392-
await ModelSendAsync(in method, k.CancellationToken)
393-
.ConfigureAwait(false);
394389

395-
bool result = await k;
396-
Debug.Assert(result);
390+
var method = new ChannelOpen();
391+
await ModelSendAsync(in method, k.CancellationToken)
392+
.ConfigureAwait(false);
397393

398-
if (_publisherConfirmationsEnabled)
399-
{
400-
await ConfirmSelectAsync(publisherConfirmationTrackingEnabled, cancellationToken)
401-
.ConfigureAwait(false);
402-
}
394+
bool result = await k;
395+
Debug.Assert(result);
396+
397+
if (_publisherConfirmationsEnabled)
398+
{
399+
await ConfirmSelectAsync(publisherConfirmationTrackingEnabled, cancellationToken)
400+
.ConfigureAwait(false);
403401
}
404402
}
405403
finally
@@ -1752,15 +1750,13 @@ private async Task ConfirmSelectAsync(bool publisherConfirmationTrackingEnablefd
17521750
}
17531751

17541752
enqueued = Enqueue(k);
1755-
if (enqueued)
1756-
{
1757-
var method = new ConfirmSelect(false);
1758-
await ModelSendAsync(in method, k.CancellationToken)
1759-
.ConfigureAwait(false);
17601753

1761-
bool result = await k;
1762-
Debug.Assert(result);
1763-
}
1754+
var method = new ConfirmSelect(false);
1755+
await ModelSendAsync(in method, k.CancellationToken)
1756+
.ConfigureAwait(false);
1757+
1758+
bool result = await k;
1759+
Debug.Assert(result);
17641760

17651761
return;
17661762
}

0 commit comments

Comments
 (0)