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)