More push messaging fixes.

Ylian Saint-Hilaire committed Feb 4, 2021 at 00:03 UTC d717135148d8c7a34e05a9c220f0d1c36b2c4abc
1 file changed +3 -1
firebase.js
+3 -1
@@ -242,11 +242,13 @@ module.exports.CreateFirebaseRelay = function (parent, url, key) {
242
243 // If the web socket is open, send now
244 if (obj.wsopen == true) {
245 - try { obj.wsclient.send(JSON.stringify({ pmt: node.pmt, payload: payload, options: options })); } catch (ex) { func(0, 'error'); return; }
245 + try { obj.wsclient.send(JSON.stringify({ pmt: node.pmt, payload: payload, options: options })); } catch (ex) { func(0, 'error'); obj.stats.sendError++; return; }
246 + obj.stats.sent++;
247 func(1);
248 } else {
249 // TODO: Buffer the push messages until TTL.
250 func(0, 'error');
251 + obj.stats.sendError++;
252 }
253 }
254 obj.connectWebSocket();