Browse Source

use same lockobject everywhere to prevent raceconditions

release/3.x.x
JanEggers 7 years ago
parent
commit
80a6e6809c
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      MQTTnet.Core/Client/MqttPacketDispatcher.cs

+ 1
- 1
MQTTnet.Core/Client/MqttPacketDispatcher.cs View File

@@ -71,7 +71,7 @@ namespace MQTTnet.Core.Client


private List<MqttPacketAwaiter> GetPacketAwaiters() private List<MqttPacketAwaiter> GetPacketAwaiters()
{ {
lock (_packetAwaiters)
lock (_syncRoot)
{ {
return new List<MqttPacketAwaiter>(_packetAwaiters); return new List<MqttPacketAwaiter>(_packetAwaiters);
} }


Loading…
Cancel
Save