]> git.r.bdr.sh - rbdr/junction/blobdiff - server/index.js
Ensure connections are closed
[rbdr/junction] / server / index.js
index 8ac427b9a60b29a1b282305ed8bc533df306bf07..e60795f8543e470edef67051d90d25e3484876f6 100644 (file)
@@ -24,8 +24,8 @@ server.on(events.types.CONNECTION, (socket) => {
     const sockets = await server.in(room).fetchSockets();
     sockets.forEach((peer) => {
       if (peer.id !== me) {
-        events.addPeer(me)(peer);
-        events.addPeer(peer.id)(socket);
+        events.addPeer(me, false)(peer);
+        events.addPeer(peer.id, true)(socket);
       }
     });
   });