From 731c89d2e90b4f409daa54116fbce42ebd911ccd Mon Sep 17 00:00:00 2001
From: logicaloud <47704763+logicaloud@users.noreply.github.com>
Date: Mon, 29 Nov 2021 00:51:29 +1300
Subject: [PATCH] Fix MQTT5 'IsPersisted' session flag handling (#1300)
---
.../Server/Internal/MqttClientSession.cs | 13 +-
.../Internal/MqttClientSessionsManager.cs | 4 +-
.../MQTTnet.Core.Tests/MQTTv5/Server_Tests.cs | 129 +++++++++++++++---
3 files changed, 118 insertions(+), 28 deletions(-)
diff --git a/Source/MQTTnet/Server/Internal/MqttClientSession.cs b/Source/MQTTnet/Server/Internal/MqttClientSession.cs
index 291b3e5a..a943f5ad 100644
--- a/Source/MQTTnet/Server/Internal/MqttClientSession.cs
+++ b/Source/MQTTnet/Server/Internal/MqttClientSession.cs
@@ -8,11 +8,6 @@ namespace MQTTnet.Server.Internal
{
readonly DateTime _createdTimestamp = DateTime.UtcNow;
- ///
- /// Session should persist if CleanSession was set to false (Mqtt3) or if SessionExpiryInterval != 0 (Mqtt5)
- ///
- readonly bool _isPersistent;
-
public MqttClientSession(
string clientId,
IDictionary