Skip to content

Releases: RomainLanz/socket

Reconnect clients after service restart

Choose a tag to compare

@github-actions github-actions released this 06 Sep 09:03

Clients now reconnect automatically after a clean server shutdown, such as during maintenance or deployment.

Service shutdowns use the standard WebSocket close code 1012 Service Restart. After reconnecting, clients restore their desired channel subscriptions and continue receiving events without a page reload.

Explicit server disconnects and kicks still use code 4000 and remain terminal by default. Client-side disconnect() also remains terminal.

Automatic reconnect delays now include bounded jitter to prevent large groups of clients from reconnecting at the same time.

Release HTTP context after WebSocket upgrade

Choose a tag to compare

@github-actions github-actions released this 06 Sep 06:46

Socket now releases the HTTP request and AdonisJS context after a WebSocket upgrade completes.

Breaking changes

socket.raw.request and socket.raw.httpContext have been removed.

The HTTP context remains available during upgrade middleware, origin validation, and authentication. Channel middleware and handlers should use:

  • socket.user for durable authenticated identity
  • socket.raw.data for connection-lifetime state

If a channel needs data from the upgrade request, extract only that data during authentication and return it as part of the authenticated user value.

Memory usage

In our benchmark with 10,000 connections, releasing the HTTP object graph reduced median server memory by:

  • 38.8 MiB of used heap
  • 41.9 MiB of RSS
  • approximately 4.1 kB of heap per connection
  • 39.7 MiB of peak RSS during mass reconnection

External memory, heartbeat cost, broadcast cost, and reconnection time did not show a meaningful change.

The benchmark uses three independent runs with forced garbage collection and a separate process for WebSocket clients.

Handle automatic resubscription errors

Choose a tag to compare

@github-actions github-actions released this 04 Sep 06:33

Failed automatic channel resubscriptions can now be handled with the new onResubscribeError callback instead of being reported as global JavaScript errors.

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 01 Sep 22:20

0.1.0 (2026-09-01)

Bug Fixes