Browse Source

Refactor task await.

release/3.x.x
Christian Kratky 6 years ago
parent
commit
6fc9f12c34
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      Source/MQTTnet.AspnetCore/MqttConnectionContext.cs

+ 2
- 2
Source/MQTTnet.AspnetCore/MqttConnectionContext.cs View File

@@ -62,7 +62,7 @@ namespace MQTTnet.AspNetCore
} }
else else
{ {
readResult = await readTask;
readResult = await readTask.ConfigureAwait(false);
} }


var buffer = readResult.Buffer; var buffer = readResult.Buffer;
@@ -115,7 +115,7 @@ namespace MQTTnet.AspNetCore
await _writerSemaphore.WaitAsync(cancellationToken).ConfigureAwait(false); await _writerSemaphore.WaitAsync(cancellationToken).ConfigureAwait(false);
try try
{ {
await output.WriteAsync(buffer, cancellationToken);
await output.WriteAsync(buffer, cancellationToken).ConfigureAwait(false);
} }
finally finally
{ {


Loading…
Cancel
Save