Skip to content

Commit 8f555c7

Browse files
Apply suggestions from code review
Co-authored-by: Daniel Marbach <[email protected]>
1 parent e439df5 commit 8f555c7

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

projects/RabbitMQ.Client/client/impl/Connection.Receive.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ private async Task ClosingLoop()
188188
{
189189
_frameHandler.ReadTimeout = TimeSpan.Zero;
190190
// Wait for response/socket closure or timeout
191-
await ReceiveLoop().ConfigureAwait(false);
191+
await ReceiveLoop()
192+
.ConfigureAwait(false);
192193
}
193194
catch (ObjectDisposedException ode)
194195
{

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,8 @@ private static void ProcessProtocolHeader(ReadOnlySequence<byte> buffer)
253253

254254
internal static async ValueTask<InboundFrame> ReadFromPipeAsync(PipeReader reader, uint maxMessageSize)
255255
{
256-
ReadResult result = await reader.ReadAsync().ConfigureAwait(false);
256+
ReadResult result = await reader.ReadAsync()
257+
.ConfigureAwait(false);
257258

258259
ReadOnlySequence<byte> buffer = result.Buffer;
259260
if (result.IsCompleted || buffer.Length == 0)
@@ -267,8 +268,9 @@ internal static async ValueTask<InboundFrame> ReadFromPipeAsync(PipeReader reade
267268
{
268269
reader.AdvanceTo(buffer.Start, buffer.End);
269270

270-
// Not enough
271-
result = await reader.ReadAsync().ConfigureAwait(false);
271+
// Not enough data, read a bit more
272+
result = await reader.ReadAsync()
273+
.ConfigureAwait(false);
272274

273275
if (result.IsCompleted || buffer.Length == 0)
274276
{

0 commit comments

Comments
 (0)