mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
MQTT In subscription qos not defaulting properly
This commit is contained in:
parent
e50d04077b
commit
2b9bfbc309
@ -314,8 +314,10 @@ module.exports = function(RED) {
|
||||
function MQTTInNode(n) {
|
||||
RED.nodes.createNode(this,n);
|
||||
this.topic = n.topic;
|
||||
this.qos = parseInt(n.qos===undefined?"2":n.qos);
|
||||
|
||||
this.qos = parseInt(n.qos);
|
||||
if (isNaN(this.qos) || this.qos < 0 || this.qos > 2) {
|
||||
this.qos = 2;
|
||||
}
|
||||
this.broker = n.broker;
|
||||
this.brokerConn = RED.nodes.getNode(this.broker);
|
||||
if (!/^(#$|(\+|[^+#]*)(\/(\+|[^+#]*))*(\/(\+|#|[^+#]*))?$)/.test(this.topic)) {
|
||||
|
Loading…
Reference in New Issue
Block a user