fix: use real client IP for auth rate limiting; preserve lobby across socket disconnect

- Store real client IP from x-forwarded-for on socket for use in JOIN_ROOM
  auth rate limiting (was using proxy IP, breaking brute-force protection)
- Remove clearEpisodeLobbyState() from socket.onclose to preserve lobby
  across brief disconnects; ensureState() recovers lobby + timeout on reconnect
- Lobby is still properly cleared on intentional LEAVE_ROOM and room switch
This commit is contained in:
Koala
2026-05-25 12:24:14 +02:00
parent b98cfc9ca1
commit c621685aae
2 changed files with 2 additions and 2 deletions
-1
View File
@@ -366,7 +366,6 @@ async function connect() {
forceSyncDeadline: null
});
clearEpisodeLobbyState();
if (currentRoom) {
currentRoom.peers = [];