From 6fc9f12c34b6b301bcda6dd637901e8725e310f1 Mon Sep 17 00:00:00 2001 From: Christian Kratky Date: Sun, 4 Nov 2018 13:18:42 +0100 Subject: [PATCH] Refactor task await. --- Source/MQTTnet.AspnetCore/MqttConnectionContext.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/MQTTnet.AspnetCore/MqttConnectionContext.cs b/Source/MQTTnet.AspnetCore/MqttConnectionContext.cs index e49b36f..a5e567a 100644 --- a/Source/MQTTnet.AspnetCore/MqttConnectionContext.cs +++ b/Source/MQTTnet.AspnetCore/MqttConnectionContext.cs @@ -62,7 +62,7 @@ namespace MQTTnet.AspNetCore } else { - readResult = await readTask; + readResult = await readTask.ConfigureAwait(false); } var buffer = readResult.Buffer; @@ -115,7 +115,7 @@ namespace MQTTnet.AspNetCore await _writerSemaphore.WaitAsync(cancellationToken).ConfigureAwait(false); try { - await output.WriteAsync(buffer, cancellationToken); + await output.WriteAsync(buffer, cancellationToken).ConfigureAwait(false); } finally {