From b88924bce50671b4270282f4ca7ec10e429eaa49 Mon Sep 17 00:00:00 2001 From: Christian Date: Fri, 29 Jan 2021 23:10:40 +0100 Subject: [PATCH] Fixed wrong buffer size calculation. --- Source/MQTTnet/Formatter/MqttPacketWriter.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/MQTTnet/Formatter/MqttPacketWriter.cs b/Source/MQTTnet/Formatter/MqttPacketWriter.cs index c7ab8ac1..48d95783 100644 --- a/Source/MQTTnet/Formatter/MqttPacketWriter.cs +++ b/Source/MQTTnet/Formatter/MqttPacketWriter.cs @@ -14,7 +14,8 @@ namespace MQTTnet.Formatter public sealed class MqttPacketWriter : IMqttPacketWriter { public static int InitialBufferSize = 4096; - public static int MaxBufferSize = 4096 + 4; + + public static int MaxBufferSize = 4096 * 4; byte[] _buffer = new byte[InitialBufferSize];