changed waiting condition

This commit is contained in:
JanEggers
2018-07-19 21:13:28 +02:00
parent ae80de26ec
commit 0dea9e6a2b
+1 -1
View File
@@ -222,7 +222,7 @@ namespace MQTTnet.Client
try
{
if (!(exception is MqttCommunicationClosedGracefullyException))
if (clientWasConnected)
{
await WaitForTaskAsync(_packetReceiverTask, sender).ConfigureAwait(false);
await WaitForTaskAsync(_keepAliveMessageSenderTask, sender).ConfigureAwait(false);