diff --git a/app.js b/app.js index e872a12..30eea35 100644 --- a/app.js +++ b/app.js @@ -67,6 +67,7 @@ async function initialize() { swarm.on('connection', async (connection, info) => { peerCount++; updatePeerCount(); + console.log('Peer connected, current peer count:', peerCount); // Send the current user's icon to the new peer const iconBuffer = await drive.get(`/icons/${userName}.png`); @@ -94,6 +95,7 @@ async function initialize() { connection.on('close', () => { peerCount--; updatePeerCount(); + console.log('Peer disconnected, current peer count:', peerCount); }); }); @@ -301,4 +303,4 @@ function toggleSetupView() { setupDiv.classList.toggle('hidden'); } -initialize(); \ No newline at end of file +initialize();