From 861efa5e75ba715c2fc6158b82b294b8149f01a5 Mon Sep 17 00:00:00 2001 From: JanEggers Date: Sat, 9 Sep 2017 08:14:53 +0200 Subject: [PATCH] dont add the same package twice to _receivedPackets --- MQTTnet.Core/Client/MqttPacketDispatcher.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MQTTnet.Core/Client/MqttPacketDispatcher.cs b/MQTTnet.Core/Client/MqttPacketDispatcher.cs index befca59..da8b1fa 100644 --- a/MQTTnet.Core/Client/MqttPacketDispatcher.cs +++ b/MQTTnet.Core/Client/MqttPacketDispatcher.cs @@ -10,7 +10,7 @@ namespace MQTTnet.Core.Client public class MqttPacketDispatcher { private readonly object _syncRoot = new object(); - private readonly List _receivedPackets = new List(); + private readonly HashSet _receivedPackets = new HashSet(); private readonly List _packetAwaiters = new List(); public async Task WaitForPacketAsync(Func selector, TimeSpan timeout)