From f3695c274b66debdeff8ddea679eee6896f215b0 Mon Sep 17 00:00:00 2001 From: Raven Scott Date: Sat, 30 Nov 2024 04:09:21 -0500 Subject: [PATCH] stop stat spam --- server/server.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/server.js b/server/server.js index f0af250..0f9aa3b 100644 --- a/server/server.js +++ b/server/server.js @@ -52,8 +52,10 @@ swarm.on('connection', (peer) => { peer.on('data', async (data) => { try { const parsedData = JSON.parse(data.toString()); - console.log(`[DEBUG] Received data from peer: ${JSON.stringify(parsedData)}`); - let response; + if (!(parsedData.command === 'stats' && Object.keys(parsedData.args).length === 0)) { + console.log(`[DEBUG] Received data from peer: ${JSON.stringify(parsedData)}`); + } + let response; switch (parsedData.command) { case 'listContainers':