From d2049d63d633abbb5bacc8fc4be7b605db97613b Mon Sep 17 00:00:00 2001 From: Christian Date: Sun, 15 Apr 2018 21:07:41 +0200 Subject: [PATCH] Refactoring minor issues --- .../Server/MqttClientPendingMessagesQueue.cs | 1 - .../MQTTnet.NetStandard/Server/MqttClientSessionsManager.cs | 2 +- .../Server/MqttClientSubscriptionsManager.cs | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Frameworks/MQTTnet.NetStandard/Server/MqttClientPendingMessagesQueue.cs b/Frameworks/MQTTnet.NetStandard/Server/MqttClientPendingMessagesQueue.cs index 9949387..9e7ebd7 100644 --- a/Frameworks/MQTTnet.NetStandard/Server/MqttClientPendingMessagesQueue.cs +++ b/Frameworks/MQTTnet.NetStandard/Server/MqttClientPendingMessagesQueue.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Concurrent; -using System.Runtime.CompilerServices; using System.Threading; using System.Threading.Tasks; using MQTTnet.Adapter; diff --git a/Frameworks/MQTTnet.NetStandard/Server/MqttClientSessionsManager.cs b/Frameworks/MQTTnet.NetStandard/Server/MqttClientSessionsManager.cs index 8dd9d06..4698f7c 100644 --- a/Frameworks/MQTTnet.NetStandard/Server/MqttClientSessionsManager.cs +++ b/Frameworks/MQTTnet.NetStandard/Server/MqttClientSessionsManager.cs @@ -187,7 +187,7 @@ namespace MQTTnet.Server { foreach (var clientSession in _sessions.Values) { - await clientSession.EnqueueApplicationMessageAsync(applicationMessage); + await clientSession.EnqueueApplicationMessageAsync(applicationMessage).ConfigureAwait(false); } } finally diff --git a/Frameworks/MQTTnet.NetStandard/Server/MqttClientSubscriptionsManager.cs b/Frameworks/MQTTnet.NetStandard/Server/MqttClientSubscriptionsManager.cs index e4ee921..9318217 100644 --- a/Frameworks/MQTTnet.NetStandard/Server/MqttClientSubscriptionsManager.cs +++ b/Frameworks/MQTTnet.NetStandard/Server/MqttClientSubscriptionsManager.cs @@ -10,8 +10,8 @@ namespace MQTTnet.Server { public sealed class MqttClientSubscriptionsManager : IDisposable { - private readonly SemaphoreSlim _semaphore = new SemaphoreSlim(1, 1); private readonly Dictionary _subscriptions = new Dictionary(); + private readonly SemaphoreSlim _semaphore = new SemaphoreSlim(1, 1); private readonly IMqttServerOptions _options; private readonly string _clientId;