event is triggered but something is blocking

This commit is contained in:
JanEggers
2018-07-19 21:13:27 +02:00
parent 21048b51ae
commit b55f5ff298
6 changed files with 45 additions and 24 deletions
+5 -2
View File
@@ -222,8 +222,11 @@ namespace MQTTnet.Client
try
{
await WaitForTaskAsync(_packetReceiverTask, sender).ConfigureAwait(false);
await WaitForTaskAsync(_keepAliveMessageSenderTask, sender).ConfigureAwait(false);
if (!(exception is MqttCommunicationClosedGracefullyException))
{
await WaitForTaskAsync(_packetReceiverTask, sender).ConfigureAwait(false);
await WaitForTaskAsync(_keepAliveMessageSenderTask, sender).ConfigureAwait(false);
}
if (_adapter != null)
{