From 153e83ee3ed72871f3b7d36001fe895eeec0b6c5 Mon Sep 17 00:00:00 2001 From: Christian Kratky Date: Tue, 26 Sep 2017 20:02:12 +0200 Subject: [PATCH] Remove not needed async/await --- MQTTnet.Core/Client/MqttClient.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MQTTnet.Core/Client/MqttClient.cs b/MQTTnet.Core/Client/MqttClient.cs index 8be6450..d300b3f 100644 --- a/MQTTnet.Core/Client/MqttClient.cs +++ b/MQTTnet.Core/Client/MqttClient.cs @@ -415,21 +415,21 @@ namespace MQTTnet.Core.Client private void StartProcessReceivedPacket(MqttBasePacket packet, CancellationToken cancellationToken) { #pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed - Task.Run(async () => await ProcessReceivedPacketAsync(packet), cancellationToken).ConfigureAwait(false); + Task.Run(() => ProcessReceivedPacketAsync(packet), cancellationToken).ConfigureAwait(false); #pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed } private void StartReceivePackets(CancellationToken cancellationToken) { #pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed - Task.Run(async () => await ReceivePackets(cancellationToken), cancellationToken).ConfigureAwait(false); ; + Task.Run(() => ReceivePackets(cancellationToken), cancellationToken).ConfigureAwait(false); ; #pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed } private void StartSendKeepAliveMessages(CancellationToken cancellationToken) { #pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed - Task.Run(async () => await SendKeepAliveMessagesAsync(cancellationToken), cancellationToken).ConfigureAwait(false); + Task.Run(() => SendKeepAliveMessagesAsync(cancellationToken), cancellationToken).ConfigureAwait(false); #pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed } }