Procházet zdrojové kódy

Remove if clause that stopped handling of tasks with exceptions.

Now the task is always awaited and thus the exception in the task is handled.
release/3.x.x
Johan x Lindqvist před 5 roky
rodič
revize
ad1c198e43
1 změnil soubory, kde provedl 2 přidání a 7 odebrání
  1. +2
    -7
      Source/MQTTnet/Client/MqttClient.cs

+ 2
- 7
Source/MQTTnet/Client/MqttClient.cs Zobrazit soubor

@@ -149,7 +149,7 @@ namespace MQTTnet.Client
Properties = new MqttAuthPacketProperties
{
// This must always be equal to the value from the CONNECT packet. So we use it here to ensure that.
AuthenticationMethod = Options.AuthenticationMethod,
AuthenticationMethod = Options.AuthenticationMethod,
AuthenticationData = data.AuthenticationData,
ReasonString = data.ReasonString,
UserProperties = data.UserProperties
@@ -567,7 +567,7 @@ namespace MQTTnet.Client
};

await SendAsync(pubRecPacket, cancellationToken).ConfigureAwait(false);
}
}
}
else
{
@@ -633,11 +633,6 @@ namespace MQTTnet.Client
return;
}

if (task.IsCanceled || task.IsCompleted || task.IsFaulted)
{
return;
}

try
{
await task.ConfigureAwait(false);


Načítá se…
Zrušit
Uložit