Fix cleanup of client sessions

This commit is contained in:
Christian Kratky
2017-11-08 00:49:49 +01:00
parent f481c704c9
commit 7e48746944
4 changed files with 6 additions and 13 deletions
@@ -164,10 +164,10 @@ namespace MQTTnet.Core.Server
if (connectPacket.CleanSession)
{
_clientSessions.Remove(connectPacket.ClientId);
clientSession.Dispose();
clientSession.Stop();
clientSession = null;
_logger.LogTrace("Disposed existing session of client '{0}'.", connectPacket.ClientId);
_logger.LogTrace("Stopped existing session of client '{0}'.", connectPacket.ClientId);
}
else
{