Automatic reconnection with exponential backoff
This release improves connection resilience by automatically reconnecting to the PeerJS signaling server when the connection drops, instead of immediately showing an error.
What's new:
- Auto-reconnect for user peers — When the signaling server connection is lost, FileSync now schedules up to 5 reconnection attempts with exponential backoff (1s → 2s → 4s → 8s → 16s). If all attempts fail, a clear error message is shown asking the user to refresh.
- Auto-reconnect for file transfer peers — File-transfer peers independently retry up to 3 times with the same backoff strategy, preventing interrupted transfers from silently failing.
- Smarter error handling — Peer errors are now classified into:
- Fatal (
browser-incompatible,invalid-id,unavailable-id,ssl-unavailable) → immediate error page. - Recoverable (
disconnected,network,server-error,socket-error,socket-closed) → triggers reconnect. - Expected (
peer-unavailable) → logged as a warning, no disruption.
- Fatal (