Skip to content

Commit c0aeb42

Browse files
danielmarbachlukebakken
authored andcommitted
My preferred cosmetic changes (feel free to drop)
1 parent 57346a8 commit c0aeb42

File tree

4 files changed

+4
-27
lines changed

4 files changed

+4
-27
lines changed

projects/RabbitMQ.Client/Impl/AutorecoveringChannel.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -253,15 +253,7 @@ await _connection.DeleteRecordedChannelAsync(this,
253253
public override string ToString()
254254
=> InnerChannel.ToString();
255255

256-
public void Dispose()
257-
{
258-
if (_disposed)
259-
{
260-
return;
261-
}
262-
263-
DisposeAsync().AsTask().GetAwaiter().GetResult();
264-
}
256+
public void Dispose() => DisposeAsync().AsTask().GetAwaiter().GetResult();
265257

266258
public async ValueTask DisposeAsync()
267259
{

projects/RabbitMQ.Client/Impl/AutorecoveringConnection.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -269,15 +269,7 @@ await RecordChannelAsync(autorecoveringChannel, channelsSemaphoreHeld: false, ca
269269
return autorecoveringChannel;
270270
}
271271

272-
public void Dispose()
273-
{
274-
if (_disposed)
275-
{
276-
return;
277-
}
278-
279-
DisposeAsync().AsTask().GetAwaiter().GetResult();
280-
}
272+
public void Dispose() => DisposeAsync().AsTask().GetAwaiter().GetResult();
281273

282274
public async ValueTask DisposeAsync()
283275
{

projects/RabbitMQ.Client/Impl/Channel.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,7 @@ await _serverOriginatedChannelCloseTcs.Task.WaitAsync(TimeSpan.FromSeconds(5))
588588
ConsumerDispatcher.Dispose();
589589
_rpcSemaphore.Dispose();
590590
_confirmSemaphore.Dispose();
591+
591592
if (_outstandingPublisherConfirmationsRateLimiter is not null)
592593
{
593594
await _outstandingPublisherConfirmationsRateLimiter.DisposeAsync()

projects/RabbitMQ.Client/Impl/Connection.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -486,15 +486,7 @@ internal ValueTask WriteAsync(RentedMemory frames, CancellationToken cancellatio
486486
return _frameHandler.WriteAsync(frames, cancellationToken);
487487
}
488488

489-
public void Dispose()
490-
{
491-
if (_disposed)
492-
{
493-
return;
494-
}
495-
496-
DisposeAsync().AsTask().GetAwaiter().GetResult();
497-
}
489+
public void Dispose() => DisposeAsync().AsTask().GetAwaiter().GetResult();
498490

499491
public async ValueTask DisposeAsync()
500492
{

0 commit comments

Comments
 (0)