isle-portable/extensions
Christian Semmler 08f44b9a93
Fix infinite reconnection loop caused by stale WebSocket onclose events
When AttemptReconnect() disconnects a still-CONNECTING socket and creates
a new one, the old socket's onclose fires asynchronously after Connect()
clears m_disconnectedFlag, setting it back to 1. With connectedFlag=1
and disconnectedFlag=1 both stuck, the state machine bounces between
STATE_CONNECTED and STATE_RECONNECTING every frame (30-60x/sec) without
ever reaching the backoff timer or attempt limit.

Guard all WebSocket event handlers to only modify shared flags when
their socket is still the active one in Module._mpSockets.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 17:25:06 -07:00
..
docs/multiplayer Fix camera flip bugs, refactor camera (#11) 2026-03-10 01:15:22 +01:00
include/extensions Nick bricks memories (#21) 2026-03-23 23:46:16 +01:00
src Fix infinite reconnection loop caused by stale WebSocket onclose events 2026-03-24 17:25:06 -07:00