diff --git a/Build/MQTTnet.nuspec b/Build/MQTTnet.nuspec
index cf7e64c..033b3ab 100644
--- a/Build/MQTTnet.nuspec
+++ b/Build/MQTTnet.nuspec
@@ -12,6 +12,7 @@
MQTTnet is a high performance .NET library for MQTT based communication. It provides a MQTT client and a MQTT server (broker).
* [Core] Performance optimizations.
* [Core] Due to performance reasons the timestamp of log messages is now in UTC format.
+* [Core] Added several packet validations.
* [Client] Received messages are now processed in the worker thread by default. Added a new setting for switching back to dedicated threads.
* [ManagedClient] Fixed a loading issue of stored application messages (thanks to @JTrotta).
* [Server] Added support for other WebSocket sub protocol formats like mqttv-3.1.1 (thanks to @israellot).
diff --git a/Frameworks/MQTTnet.NetStandard/Serializer/MqttPacketSerializer.cs b/Frameworks/MQTTnet.NetStandard/Serializer/MqttPacketSerializer.cs
index 75da85d..cfe8010 100644
--- a/Frameworks/MQTTnet.NetStandard/Serializer/MqttPacketSerializer.cs
+++ b/Frameworks/MQTTnet.NetStandard/Serializer/MqttPacketSerializer.cs
@@ -345,12 +345,12 @@ namespace MQTTnet.Serializer
if (ProtocolVersion == MqttProtocolVersion.V311)
{
stream.WriteWithLengthPrefix("MQTT");
- stream.WriteByte(0x04); // 3.1.2.2 Protocol Level 4
+ stream.WriteByte(4); // 3.1.2.2 Protocol Level 4
}
else
{
stream.WriteWithLengthPrefix("MQIsdp");
- stream.WriteByte(0x03); // Protocol Level 3
+ stream.WriteByte(3); // Protocol Level 3
}
var connectFlags = new ByteWriter(); // 3.1.2.3 Connect Flags
@@ -410,6 +410,7 @@ namespace MQTTnet.Serializer
{
var connectAcknowledgeFlags = new ByteWriter();
connectAcknowledgeFlags.Write(packet.IsSessionPresent);
+
stream.Write(connectAcknowledgeFlags);
}
else