Przeglądaj źródła

Merge remote-tracking branch 'origin/develop' into develop

release/3.x.x
Christian Kratky 5 lat temu
rodzic
commit
5895a73f85
1 zmienionych plików z 8 dodań i 1 usunięć
  1. +8
    -1
      Source/MQTTnet.Extensions.ManagedClient/ManagedMqttClient.cs

+ 8
- 1
Source/MQTTnet.Extensions.ManagedClient/ManagedMqttClient.cs Wyświetl plik

@@ -387,7 +387,10 @@ namespace MQTTnet.Extensions.ManagedClient
//removed it, in which case we don't want to do anything.
_messageQueue.RemoveFirst(i => i.Id.Equals(message.Id));
}
_storageManager?.RemoveAsync(message).GetAwaiter().GetResult();
if (_storageManager != null)
{
_storageManager.RemoveAsync(message).GetAwaiter().GetResult();
}
}
catch (MqttCommunicationException exception)
{
@@ -408,6 +411,10 @@ namespace MQTTnet.Extensions.ManagedClient
{
_messageQueue.RemoveFirst(i => i.Id.Equals(message.Id));
}
if (_storageManager != null)
{
_storageManager.RemoveAsync(message).GetAwaiter().GetResult();
}
}
}
catch (Exception exception)


Ładowanie…
Anuluj
Zapisz