From 1c0b2b55b6157c17e7bfa59352a339021c4df60f Mon Sep 17 00:00:00 2001 From: Christian Kratky Date: Mon, 23 Oct 2017 18:57:36 +0200 Subject: [PATCH] Fix bugs --- MQTTnet.Core/Server/MqttClientSession.cs | 6 +++--- MQTTnet.Core/Server/MqttClientSessionsManager.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MQTTnet.Core/Server/MqttClientSession.cs b/MQTTnet.Core/Server/MqttClientSession.cs index 0870a66..2bd3617 100644 --- a/MQTTnet.Core/Server/MqttClientSession.cs +++ b/MQTTnet.Core/Server/MqttClientSession.cs @@ -28,11 +28,11 @@ namespace MQTTnet.Core.Server public MqttClientSession(string clientId, MqttClientSessionsManager mqttClientSessionsManager, ILogger logger, ILogger msgQueueLogger) { - ClientId = clientId; - _options = mqttClientSessionsManager.Options; _mqttClientSessionsManager = mqttClientSessionsManager ?? throw new ArgumentNullException(nameof(mqttClientSessionsManager)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); + ClientId = clientId; + _options = mqttClientSessionsManager.Options; _pendingMessagesQueue = new MqttClientPendingMessagesQueue(mqttClientSessionsManager.Options, this, msgQueueLogger); } @@ -78,7 +78,7 @@ namespace MQTTnet.Core.Server _adapter = null; - _trace.Information(nameof(MqttClientSession), "Client '{0}': Disconnected.", ClientId); + _logger.LogInformation("Client '{0}': Disconnected.", ClientId); } finally { diff --git a/MQTTnet.Core/Server/MqttClientSessionsManager.cs b/MQTTnet.Core/Server/MqttClientSessionsManager.cs index 5622f88..b621b83 100644 --- a/MQTTnet.Core/Server/MqttClientSessionsManager.cs +++ b/MQTTnet.Core/Server/MqttClientSessionsManager.cs @@ -167,7 +167,7 @@ namespace MQTTnet.Core.Server clientSession.Dispose(); clientSession = null; - _trace.Verbose(nameof(MqttClientSessionsManager), "Disposed existing session of client '{0}'.", connectPacket.ClientId); + _logger.LogTrace("Disposed existing session of client '{0}'.", connectPacket.ClientId); } else {