mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Overlapping mqtt subs get duplicate messages
This commit is contained in:
parent
ce7bf78349
commit
4475e74187
@ -20,7 +20,7 @@ var settings = require(process.env.NODE_RED_HOME+"/red/red").settings;
|
||||
var connections = {};
|
||||
|
||||
function matchTopic(ts,t) {
|
||||
var re = new RegExp("^"+ts.replace(/([\[\]\?\(\)\\\\$\^\*\.|])/g,"\\$1").replace(/\+/g,"[^/]+").replace(/#$/,".*"));
|
||||
var re = new RegExp("^"+ts.replace(/([\[\]\?\(\)\\\\$\^\*\.|])/g,"\\$1").replace(/\+/g,"[^/]+").replace(/#$/,".*")+"$");
|
||||
return re.test(t);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user