Browse Source

Small fix for inconsistent client name in log

release/3.x.x
Jens-Christian Skibakk 6 years ago
parent
commit
2b10200101
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      Source/MQTTnet/Server/MqttClientKeepAliveMonitor.cs

+ 4
- 4
Source/MQTTnet/Server/MqttClientKeepAliveMonitor.cs View File

@@ -14,9 +14,9 @@ namespace MQTTnet.Server


private readonly IMqttClientSession _clientSession; private readonly IMqttClientSession _clientSession;
private readonly IMqttNetChildLogger _logger; private readonly IMqttNetChildLogger _logger;
private bool _isPaused; private bool _isPaused;
public MqttClientKeepAliveMonitor(IMqttClientSession clientSession, IMqttNetChildLogger logger) public MqttClientKeepAliveMonitor(IMqttClientSession clientSession, IMqttNetChildLogger logger)
{ {
if (logger == null) throw new ArgumentNullException(nameof(logger)); if (logger == null) throw new ArgumentNullException(nameof(logger));
@@ -76,7 +76,7 @@ namespace MQTTnet.Server
{ {
_logger.Warning(null, "Client '{0}': Did not receive any packet or keep alive signal.", _clientSession.ClientId); _logger.Warning(null, "Client '{0}': Did not receive any packet or keep alive signal.", _clientSession.ClientId);
_clientSession.Stop(MqttClientDisconnectType.NotClean); _clientSession.Stop(MqttClientDisconnectType.NotClean);
return; return;
} }


@@ -96,7 +96,7 @@ namespace MQTTnet.Server
} }
finally finally
{ {
_logger.Verbose("Client {0}: Stopped checking keep alive timeout.", _clientSession.ClientId);
_logger.Verbose("Client '{0}': Stopped checking keep alive timeout.", _clientSession.ClientId);
} }
} }
} }


Loading…
Cancel
Save