mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-22 04:43:04 +08:00
improve exceptions in case of corrupt packages close pipes after exception occoured to avoid lingering connections should fix #788
This commit is contained in:
@@ -6,10 +6,15 @@ namespace MQTTnet.Tests
|
||||
[TestClass]
|
||||
public class MqttPacketWriter_Tests
|
||||
{
|
||||
protected virtual IMqttPacketWriter WriterFactory()
|
||||
{
|
||||
return new MqttPacketWriter();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void WritePacket()
|
||||
{
|
||||
var writer = new MqttPacketWriter();
|
||||
var writer = WriterFactory();
|
||||
Assert.AreEqual(0, writer.Length);
|
||||
|
||||
writer.WriteWithLengthPrefix("1234567890");
|
||||
|
||||
Reference in New Issue
Block a user