1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-02-12 11:01:52 +00:00

More push messaging fixes.

This commit is contained in:
Ylian Saint-Hilaire 2021-02-04 00:03:51 -08:00
parent 87896b5f0d
commit d717135148

View file

@ -242,11 +242,13 @@ module.exports.CreateFirebaseRelay = function (parent, url, key) {
// If the web socket is open, send now // If the web socket is open, send now
if (obj.wsopen == true) { if (obj.wsopen == true) {
try { obj.wsclient.send(JSON.stringify({ pmt: node.pmt, payload: payload, options: options })); } catch (ex) { func(0, 'error'); return; } try { obj.wsclient.send(JSON.stringify({ pmt: node.pmt, payload: payload, options: options })); } catch (ex) { func(0, 'error'); obj.stats.sendError++; return; }
obj.stats.sent++;
func(1); func(1);
} else { } else {
// TODO: Buffer the push messages until TTL. // TODO: Buffer the push messages until TTL.
func(0, 'error'); func(0, 'error');
obj.stats.sendError++;
} }
} }
obj.connectWebSocket(); obj.connectWebSocket();