From 8c37cf16c03c5f7cb8f5e069702cd76bff7c82b0 Mon Sep 17 00:00:00 2001 From: JanEggers Date: Thu, 10 May 2018 22:28:01 +0200 Subject: [PATCH] fixed tests --- .../MQTTnet.NetStandard/Serializer/MqttPacketSerializer.cs | 2 +- Frameworks/MQTTnet.NetStandard/Serializer/MqttPacketWriter.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Frameworks/MQTTnet.NetStandard/Serializer/MqttPacketSerializer.cs b/Frameworks/MQTTnet.NetStandard/Serializer/MqttPacketSerializer.cs index a4e05a0..12330b5 100644 --- a/Frameworks/MQTTnet.NetStandard/Serializer/MqttPacketSerializer.cs +++ b/Frameworks/MQTTnet.NetStandard/Serializer/MqttPacketSerializer.cs @@ -397,7 +397,7 @@ namespace MQTTnet.Serializer throw new MqttProtocolViolationException("Protocol version not supported."); } - stream.Write((byte)packet.ConnectReturnCode); + stream.WriteByte((byte)packet.ConnectReturnCode); return MqttPacketWriter.BuildFixedHeader(MqttControlPacketType.ConnAck); } diff --git a/Frameworks/MQTTnet.NetStandard/Serializer/MqttPacketWriter.cs b/Frameworks/MQTTnet.NetStandard/Serializer/MqttPacketWriter.cs index 7d75e7a..1d04018 100644 --- a/Frameworks/MQTTnet.NetStandard/Serializer/MqttPacketWriter.cs +++ b/Frameworks/MQTTnet.NetStandard/Serializer/MqttPacketWriter.cs @@ -25,7 +25,7 @@ namespace MQTTnet.Serializer { if (value == null) throw new ArgumentNullException(nameof(value)); - stream.Write(value.Value); + stream.WriteByte(value.Value); } public static void WriteWithLengthPrefix(this Stream stream, string value)