Skip to content

Commit 89ae3ef

Browse files
committed
Adding .ConfigureAwait(false)
1 parent 617cfef commit 89ae3ef

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ private async Task MainLoop()
4747
{
4848
try
4949
{
50-
await ReceiveLoop();
50+
await ReceiveLoop().ConfigureAwait(false);
5151
}
5252
catch (EndOfStreamException eose)
5353
{
@@ -56,7 +56,7 @@ private async Task MainLoop()
5656
}
5757
catch (HardProtocolException hpe)
5858
{
59-
await HardProtocolExceptionHandler(hpe);
59+
await HardProtocolExceptionHandler(hpe).ConfigureAwait(false);
6060
}
6161
catch (Exception ex)
6262
{
@@ -70,7 +70,7 @@ private async Task ReceiveLoop()
7070
{
7171
while (!_closed)
7272
{
73-
InboundFrame frame = await _frameHandler.ReadFrame();
73+
InboundFrame frame = await _frameHandler.ReadFrame().ConfigureAwait(false);
7474
NotifyHeartbeatListener();
7575

7676
bool shallReturn = true;
@@ -151,7 +151,7 @@ private async Task HardProtocolExceptionHandler(HardProtocolException hpe)
151151
_session0.Transmit(in cmd);
152152
if (hpe.CanShutdownCleanly)
153153
{
154-
await ClosingLoop();
154+
await ClosingLoop().ConfigureAwait(false);
155155
}
156156
}
157157
catch (IOException ioe)
@@ -174,7 +174,7 @@ private async Task ClosingLoop()
174174
{
175175
_frameHandler.ReadTimeout = TimeSpan.Zero;
176176
// Wait for response/socket closure or timeout
177-
await ReceiveLoop();
177+
await ReceiveLoop().ConfigureAwait(false);
178178
}
179179
catch (ObjectDisposedException ode)
180180
{

0 commit comments

Comments
 (0)