mirror of
https://github.com/Shik3i/KoalaSync.git
synced 2026-08-10 11:38:22 +00:00
fix: resolve peer isolation and invitation link sync issues
This commit is contained in:
+3
-1
@@ -222,8 +222,10 @@ io.on('connection', (socket) => {
|
||||
if (data.peerId === peerId && sid !== socket.id) {
|
||||
const oldSocket = io.sockets.sockets.get(sid);
|
||||
if (oldSocket) {
|
||||
oldSocket.emit(EVENTS.ERROR, { message: 'Deduplication: Another session with this ID joined. Disconnecting...' });
|
||||
oldSocket.leave(roomId);
|
||||
socketToRoom.delete(sid);
|
||||
oldSocket.disconnect(true);
|
||||
log('DEDUPE', `Kicked old session for peer ${peerId}`);
|
||||
}
|
||||
room.peers.delete(sid);
|
||||
room.peerIds.delete(sid);
|
||||
|
||||
Reference in New Issue
Block a user