dont use thread static buffers they are overlapping on server due to async io

This commit is contained in:
Jan Eggers
2018-06-25 15:31:49 +02:00
parent 5923c7c408
commit b77798f885
5 changed files with 27 additions and 31 deletions
@@ -14,7 +14,9 @@ namespace MQTTnet.Core.Tests
[ExpectedException(typeof(MqttCommunicationClosedGracefullyException))]
public void MqttPacketReader_EmptyStream()
{
MqttPacketReader.ReadFixedHeaderAsync(new TestMqttChannel(new MemoryStream()), CancellationToken.None).GetAwaiter().GetResult();
var fixedHeader = new byte[2];
var singleByteBuffer = new byte[1];
MqttPacketReader.ReadFixedHeaderAsync(new TestMqttChannel(new MemoryStream()), fixedHeader, singleByteBuffer, CancellationToken.None).GetAwaiter().GetResult();
}
}
}