mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-01-15 15:48:05 +00:00
Move reconnectAttempts from local variable to useRef so it persists across recursive connectWebSocket calls. Previously, each call reset the counter to 0, causing infinite reconnection attempts instead of stopping at the max of 5. Also reset the counter on successful connection (onopen) so fresh reconnection attempts get full retries.