Added custom exception for gracefully closed exceptions.

This commit is contained in:
Christian Kratky
2018-06-11 00:26:38 +02:00
parent 20779dfece
commit 26eed30dbf
6 changed files with 20 additions and 3 deletions
+8 -1
View File
@@ -100,7 +100,14 @@ namespace MQTTnet.Server
{
if (exception is MqttCommunicationException)
{
_logger.Warning(exception, "Client '{0}': Communication exception while receiving client packets.", ClientId);
if (exception is MqttCommunicationClosedGracefullyException)
{
_logger.Verbose("Client '{0}': Connection closed gracefully.", ClientId); ;
}
else
{
_logger.Warning(exception, "Client '{0}': Communication exception while receiving client packets.", ClientId);
}
}
else
{