From 7d4c857a43c61002844a841af6a1a8f1dd7a62c9 Mon Sep 17 00:00:00 2001 From: Steve-Mcl Date: Fri, 12 Aug 2022 15:47:15 +0100 Subject: [PATCH] ensure sessionExpiry(Interval) is applied --- .../node_modules/@node-red/nodes/core/network/10-mqtt.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/node_modules/@node-red/nodes/core/network/10-mqtt.js b/packages/node_modules/@node-red/nodes/core/network/10-mqtt.js index 9e6195b5d..dccf1310b 100644 --- a/packages/node_modules/@node-red/nodes/core/network/10-mqtt.js +++ b/packages/node_modules/@node-red/nodes/core/network/10-mqtt.js @@ -474,7 +474,6 @@ module.exports = function(RED) { setIfHasProperty(opts, node, "protocolVersion", init); setIfHasProperty(opts, node, "keepalive", init); setIfHasProperty(opts, node, "cleansession", init); - setIfHasProperty(opts, node, "sessionExpiry", init); setIfHasProperty(opts, node, "topicAliasMaximum", init); setIfHasProperty(opts, node, "maximumPacketSize", init); setIfHasProperty(opts, node, "receiveMaximum", init); @@ -484,6 +483,11 @@ module.exports = function(RED) { } else if (hasProperty(opts, "userProps")) { node.userProperties = opts.userProps; } + if (hasProperty(opts, "sessionExpiry")) { + node.sessionExpiryInterval = opts.sessionExpiry; + } else if (hasProperty(opts, "sessionExpiryInterval")) { + node.sessionExpiryInterval = opts.sessionExpiryInterval + } function createLWT(topic, payload, qos, retain, v5opts, v5SubPropName) { let message = undefined;