From f585a76e64d9f38701cdd596517646b1ce2a102e Mon Sep 17 00:00:00 2001 From: sairajzero Date: Thu, 6 Jul 2023 22:54:55 +0530 Subject: [PATCH] Bug fix - Fixed: data not forwarded to backup nodes properly --- src/server.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server.js b/src/server.js index 1619fb2..999432c 100644 --- a/src/server.js +++ b/src/server.js @@ -35,12 +35,12 @@ module.exports = function Server(port) { console.debug("POST:", data); //process the all data request types client.processIncomingData(data).then(result => { - res.end(JSON.stringify(result[0])); - if (result[1]) { + res.end(JSON.stringify(result[0])); //result[0] = full data + if (result[1]) { //result[1] = mode (ie: DATA/TAG/NOTE) refresher.countdown; if (['DATA', 'TAG', 'NOTE'].includes(result[1])) sendToLiveRequests(result[0]); - intra.forwardToNextNode(result[2], result[0]); + intra.forwardToNextNode(result[1], result[0]); }; }).catch(error => { if (error instanceof INVALID)