1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Improved CertURL certificate loading.

This commit is contained in:
Ylian Saint-Hilaire 2020-03-19 13:42:37 -07:00
parent 944463b90a
commit 3b192b6295
6 changed files with 13 additions and 8 deletions

View file

@ -124,7 +124,7 @@ module.exports.CreateMQTTBroker = function (parent, db, args) {
// Look for any MQTT connections to send this to
var clients = obj.connections[nodeid];
if (clients == null) return;
if (typeof message == 'string') { message = new Buffer(message); }
if (typeof message == 'string') { message = Buffer.from(message); }
for (var i in clients) {
// Only publish to client that subscribe to the topic
if (clients[i].subscriptions[topic] != null) { clients[i].publish({ cmd: 'publish', qos: 0, topic: topic, payload: message, retain: false }); }