瀏覽代碼

Removed checks for user properties in MQTT v3 and instead ignore them.

release/3.x.x
SeppPenner 4 年之前
父節點
當前提交
c40e3c64aa
共有 1 個檔案被更改,包括 0 行新增15 行删除
  1. +0
    -15
      Source/MQTTnet/Formatter/V3/MqttV310DataConverter.cs

+ 0
- 15
Source/MQTTnet/Formatter/V3/MqttV310DataConverter.cs 查看文件

@@ -20,11 +20,6 @@ namespace MQTTnet.Formatter.V3
{
if (applicationMessage == null) throw new ArgumentNullException(nameof(applicationMessage));

if (applicationMessage.UserProperties?.Any() == true)
{
throw new MqttProtocolViolationException("User properties are not supported in MQTT version 3.");
}

return new MqttPublishPacket
{
Topic = applicationMessage.Topic,
@@ -171,11 +166,6 @@ namespace MQTTnet.Formatter.V3
{
if (options == null) throw new ArgumentNullException(nameof(options));

if (options.UserProperties?.Any() == true)
{
throw new MqttProtocolViolationException("User properties are not supported in MQTT version 3.");
}

var subscribePacket = new MqttSubscribePacket();
subscribePacket.TopicFilters.AddRange(options.TopicFilters);
@@ -186,11 +176,6 @@ namespace MQTTnet.Formatter.V3
{
if (options == null) throw new ArgumentNullException(nameof(options));

if (options.UserProperties?.Any() == true)
{
throw new MqttProtocolViolationException("User properties are not supported in MQTT version 3.");
}

var unsubscribePacket = new MqttUnsubscribePacket();
unsubscribePacket.TopicFilters.AddRange(options.TopicFilters);



Loading…
取消
儲存