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:
parent
87896b5f0d
commit
d717135148
1 changed files with 3 additions and 1 deletions
|
@ -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();
|
||||||
|
|
Loading…
Reference in a new issue