From 7399585d9e21061d76541eb03765baf629596487 Mon Sep 17 00:00:00 2001 From: MrMasrozYTLIVE <61359286+MrMasrozYTLIVE@users.noreply.github.com> Date: Mon, 10 Jun 2024 17:38:50 +0300 Subject: [PATCH] Trying to find a way to check which topic each pear is from --- chatBot/includes/client.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/chatBot/includes/client.js b/chatBot/includes/client.js index 2842096..c9813c6 100644 --- a/chatBot/includes/client.js +++ b/chatBot/includes/client.js @@ -21,8 +21,10 @@ class Client extends EventEmitter { this.swarm.on('update', () => { console.log(`Peers count: ${this.swarm.connections.size}`); - console.log([...this.swarm.connections]); - if(this.swarm.connections.size > 0) process.exit(-1); + if(this.swarm.connections.size > 0) { + console.log([...this.swarm]); + process.exit(-1); + } }); }