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;