提交 725cfb64 编写于 作者: C Christian

Set MaximumQoS properly.

上级 29ec6edb
......@@ -4,6 +4,7 @@
using System;
using MQTTnet.Packets;
using MQTTnet.Protocol;
using MQTTnet.Server;
namespace MQTTnet.Formatter
......@@ -25,6 +26,7 @@ namespace MQTTnet.Formatter
SubscriptionIdentifiersAvailable = true,
SharedSubscriptionAvailable = false,
TopicAliasMaximum = ushort.MaxValue,
MaximumQoS = MqttQualityOfServiceLevel.ExactlyOnce,
WildcardSubscriptionAvailable = true,
AuthenticationMethod = validatingConnectionEventArgs.AuthenticationMethod,
......@@ -32,7 +34,11 @@ namespace MQTTnet.Formatter
AssignedClientIdentifier = validatingConnectionEventArgs.AssignedClientIdentifier,
ReasonString = validatingConnectionEventArgs.ReasonString,
ServerReference = validatingConnectionEventArgs.ServerReference,
UserProperties = validatingConnectionEventArgs.ResponseUserProperties
UserProperties = validatingConnectionEventArgs.ResponseUserProperties,
ResponseInformation = null,
MaximumPacketSize = 0, // Unlimited,
ReceiveMaximum = 0 // Unlimited
};
return connAckPacket;
......
......@@ -72,11 +72,11 @@ namespace MQTTnet.Formatter.V5
if (value == MqttQualityOfServiceLevel.AtLeastOnce)
{
Write(MqttPropertyId.MaximumQoS, true);
Write(MqttPropertyId.MaximumQoS, 0x1);
}
else
{
Write(MqttPropertyId.MaximumQoS, false);
Write(MqttPropertyId.MaximumQoS, 0x0);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册