Skip to content

Commit

Permalink
Cleanup for blackboard fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
TekMonksGitHub committed Apr 20, 2024
1 parent ec8b040 commit e92476b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions backend/server/lib/blackboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ function _broadcast(msg) {
const topic = msg.topic;
if (topics[topic]) for (const subscriber of topics[topic]) {
const {callback, options} = subscriber;
if (!options) callback(msg.payload); // no options means receive all the time
else if (options[module.exports.LOCAL_ONLY]) {if (msg.processid == process.pid) callback(msg.payload); continue;}
else if (options[module.exports.EXTERNAL_ONLY]) {if (msg.processid != process.pid) callback(msg.payload); continue;}
else callback(msg.payload); // no valid option - so send it out still
if (!options) {callback(msg.payload); continue;} // no options means receive all the time
if (options[module.exports.LOCAL_ONLY]) {if (msg.processid == process.pid) callback(msg.payload); continue;}
if (options[module.exports.EXTERNAL_ONLY]) {if (msg.processid != process.pid) callback(msg.payload); continue;}
callback(msg.payload); // no valid option - so send it out still
}
}

Expand Down

0 comments on commit e92476b

Please sign in to comment.