# joewalnes/reconnecting-websocket

A small decorator for the JavaScript WebSocket API that automatically reconnects

Repository: https://github.com/joewalnes/reconnecting-websocket
Canonical: https://ross.abutalabs.com/products/reconnecting-websocket
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2022-07-26T18:35:34+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 5332, "days_push": 1499, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4319, forks 953 (observed 2026-08-28T04:08:41.923966+00:00)

## What it is
A tiny JavaScript library (<600 bytes gzipped) that wraps the native WebSocket API to add automatic reconnection when the connection drops. It is a drop-in, API-compatible replacement for WebSocket with configurable reconnect intervals, backoff, and timeouts.

## Use cases
- keep a websocket connection alive with automatic reconnect
- replace WebSocket with a reconnecting version
- handle dropped websocket connections in a browser app
- add exponential backoff to websocket reconnection
- maintain realtime data feed over websocket
- reconnect websocket after server restart

## When to choose
- you want a minimal, zero-dependency drop-in replacement for WebSocket with auto-reconnect
- you need configurable reconnect intervals and backoff
- you want API compatibility so existing WebSocket code keeps working

## When to avoid
- you need a full realtime client with pub/sub, channels, or fallback transports (consider Socket.IO or similar)
- you need reconnection logic with heartbeat/ping-pong health checks
- your project uses native WebSocket with custom reconnection already

## Facets
- artifact type: library
- maturity: maintenance
- function: websocket, http-client
- domain: web-development, frontend
- platform: browser
- tags: websocket-reconnect, drop-in-replacement, tiny-library, zero-dependency, real-time, nodejs, javascript

## Member repositories
- joewalnes/reconnecting-websocket (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:41.923966+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:21:44.387908+00:00, confidence not recorded.
  - readme: https://github.com/joewalnes/reconnecting-websocket (fetched 2026-08-28T04:08:41.923966+00:00, sha 0ad612ab0a73)
- Data as of 2026-08-30T08:39:29.467469+00:00.
