Trying to find a way to check which topic each pear is from

This commit is contained in:
MrMasrozYTLIVE 2024-06-10 17:38:50 +03:00
parent fda25abe8c
commit 7399585d9e

View File

@ -21,8 +21,10 @@ class Client extends EventEmitter {
this.swarm.on('update', () => { this.swarm.on('update', () => {
console.log(`Peers count: ${this.swarm.connections.size}`); console.log(`Peers count: ${this.swarm.connections.size}`);
console.log([...this.swarm.connections]); if(this.swarm.connections.size > 0) {
if(this.swarm.connections.size > 0) process.exit(-1); console.log([...this.swarm]);
process.exit(-1);
}
}); });
} }