소스 검색

fixed async await return bug

release/3.x.x
Eggers Jan 7 년 전
부모
커밋
455a047242
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. +3
    -0
      MQTTnet.Core/Client/MqttClient.cs

+ 3
- 0
MQTTnet.Core/Client/MqttClient.cs 파일 보기

@@ -288,12 +288,14 @@ namespace MQTTnet.Core.Client
if (publishPacket.QualityOfServiceLevel == MqttQualityOfServiceLevel.AtMostOnce)
{
FireApplicationMessageReceivedEvent(publishPacket);
return;
}

if (publishPacket.QualityOfServiceLevel == MqttQualityOfServiceLevel.AtLeastOnce)
{
FireApplicationMessageReceivedEvent(publishPacket);
await SendAsync(new MqttPubAckPacket { PacketIdentifier = publishPacket.PacketIdentifier });
return;
}

if (publishPacket.QualityOfServiceLevel == MqttQualityOfServiceLevel.ExactlyOnce)
@@ -306,6 +308,7 @@ namespace MQTTnet.Core.Client

FireApplicationMessageReceivedEvent(publishPacket);
await SendAsync(new MqttPubRecPacket { PacketIdentifier = publishPacket.PacketIdentifier });
return;
}

throw new MqttCommunicationException("Received a not supported QoS level.");


불러오는 중...
취소
저장