|
@@ -328,10 +328,7 @@ namespace MQTTnet.Formatter.V5 |
|
|
{ |
|
|
{ |
|
|
ThrowReasonCodeNotSetException(); |
|
|
ThrowReasonCodeNotSetException(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
packetWriter.Write(packet.PacketIdentifier.Value); |
|
|
|
|
|
packetWriter.Write((byte)packet.ReasonCode.Value); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var propertiesWriter = new MqttV500PropertiesWriter(); |
|
|
var propertiesWriter = new MqttV500PropertiesWriter(); |
|
|
if (packet.Properties != null) |
|
|
if (packet.Properties != null) |
|
|
{ |
|
|
{ |
|
@@ -339,6 +336,8 @@ namespace MQTTnet.Formatter.V5 |
|
|
propertiesWriter.WriteUserProperties(packet.Properties.UserProperties); |
|
|
propertiesWriter.WriteUserProperties(packet.Properties.UserProperties); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
packetWriter.Write(packet.PacketIdentifier.Value); |
|
|
|
|
|
|
|
|
if (packetWriter.Length > 0 || packet.ReasonCode.Value != MqttPubRecReasonCode.Success) |
|
|
if (packetWriter.Length > 0 || packet.ReasonCode.Value != MqttPubRecReasonCode.Success) |
|
|
{ |
|
|
{ |
|
|
packetWriter.Write((byte)packet.ReasonCode.Value); |
|
|
packetWriter.Write((byte)packet.ReasonCode.Value); |
|
|