You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
v3.0.3: cap socket.io reconnects + monitor cleanup on terminal failure
Defense-in-depth on top of v3.0.2's websocket-only fix. Three changes:
@pryv/socket.io
- io() now passes reconnectionAttempts: 10, reconnectionDelayMax: 60000,
randomizationFactor: 0.5. socket.io-client defaults are infinite
attempts at <=5s — one stuck client could drive ~17k req/day per tab.
With these settings the client gives up after ~10 attempts spread over
~1 minute.
- New 'reconnect_failed' listener tears down the underlying _io and
emits 'error' so consumers can clean up instead of leaving a zombie
socket reference.
@pryv/monitor
- UpdateMethod/Socket.js error handler now drops this.socket if the
underlying _io has been torn down. A future Changes.READY will
rebuild from scratch instead of short-circuiting on the dead handle.
Plus npm audit fix (non-breaking) — 15 → 5 vulnerabilities (the
remaining 5 need --force / major version bumps in dev deps; out of
scope for this PR).
-`@pryv/socket.io`: cap reconnection (`reconnectionAttempts: 10`, `reconnectionDelayMax: 60000`, `randomizationFactor: 0.5`) so a server-side outage no longer drives an unbounded reconnect loop. Listens for `reconnect_failed` and surfaces a terminal `error` event so consumers can clean up instead of leaving a zombie socket reference.
7
+
-`@pryv/monitor`: when the underlying socket.io transport dies (terminal `reconnect_failed`), drop the cached socket reference so a future `Changes.READY` cycle rebuilds from scratch instead of short-circuiting on the dead handle.
0 commit comments