Browse Source

Fix bugs

release/3.x.x
Christian Kratky 7 years ago
parent
commit
1c0b2b55b6
2 changed files with 4 additions and 4 deletions
  1. +3
    -3
      MQTTnet.Core/Server/MqttClientSession.cs
  2. +1
    -1
      MQTTnet.Core/Server/MqttClientSessionsManager.cs

+ 3
- 3
MQTTnet.Core/Server/MqttClientSession.cs View File

@@ -28,11 +28,11 @@ namespace MQTTnet.Core.Server


public MqttClientSession(string clientId, MqttClientSessionsManager mqttClientSessionsManager, ILogger<MqttClientSession> logger, ILogger<MqttClientPendingMessagesQueue> msgQueueLogger) public MqttClientSession(string clientId, MqttClientSessionsManager mqttClientSessionsManager, ILogger<MqttClientSession> logger, ILogger<MqttClientPendingMessagesQueue> msgQueueLogger)
{ {
ClientId = clientId;
_options = mqttClientSessionsManager.Options;
_mqttClientSessionsManager = mqttClientSessionsManager ?? throw new ArgumentNullException(nameof(mqttClientSessionsManager)); _mqttClientSessionsManager = mqttClientSessionsManager ?? throw new ArgumentNullException(nameof(mqttClientSessionsManager));
_logger = logger ?? throw new ArgumentNullException(nameof(logger)); _logger = logger ?? throw new ArgumentNullException(nameof(logger));
ClientId = clientId;


_options = mqttClientSessionsManager.Options;
_pendingMessagesQueue = new MqttClientPendingMessagesQueue(mqttClientSessionsManager.Options, this, msgQueueLogger); _pendingMessagesQueue = new MqttClientPendingMessagesQueue(mqttClientSessionsManager.Options, this, msgQueueLogger);
} }


@@ -78,7 +78,7 @@ namespace MQTTnet.Core.Server


_adapter = null; _adapter = null;


_trace.Information(nameof(MqttClientSession), "Client '{0}': Disconnected.", ClientId);
_logger.LogInformation("Client '{0}': Disconnected.", ClientId);
} }
finally finally
{ {


+ 1
- 1
MQTTnet.Core/Server/MqttClientSessionsManager.cs View File

@@ -167,7 +167,7 @@ namespace MQTTnet.Core.Server
clientSession.Dispose(); clientSession.Dispose();
clientSession = null; 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 else
{ {


Loading…
Cancel
Save