mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Ensure MQTT node cleansession/keepalive defaults are used
This commit is contained in:
		| @@ -240,6 +240,10 @@ | ||||
|                 label: this._("mqtt.tabs-label.will") | ||||
|             }); | ||||
|             setTimeout(function() { tabs.resize()},0); | ||||
|             if (typeof this.cleansession === 'undefined') { | ||||
|                 this.cleansession = true; | ||||
|                 $("#node-config-input-cleansession").prop("checked",true); | ||||
|             } | ||||
|             if (typeof this.usetls  === 'undefined'){ | ||||
|                 this.usetls = false; | ||||
|                 $("#node-config-input-usetls").prop("checked",false); | ||||
| @@ -254,6 +258,7 @@ | ||||
|             } | ||||
|             if (typeof this.keepalive  === 'undefined'){ | ||||
|                 this.keepalive = 15; | ||||
|                 $("#node-config-input-keepalive").val(this.keepalive); | ||||
|             } | ||||
|  | ||||
|             function updateTLSOptions() { | ||||
|   | ||||
| @@ -103,7 +103,7 @@ module.exports = function(RED) { | ||||
|         this.options.username = this.username; | ||||
|         this.options.password = this.password; | ||||
|         this.options.keepalive = this.keepalive; | ||||
|         this.options.clean = this.clean; | ||||
|         this.options.clean = this.cleansession; | ||||
|         this.options.reconnectPeriod = RED.settings.mqttReconnectTime||5000; | ||||
|         if (this.compatmode == "true" || this.compatmode === true){ | ||||
|             this.options.protocolId = 'MQIsdp'; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user