Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add automatic WebSocket reconnection with exponential backoff #595

Open
@EhabY

Description

@EhabY

WebSocket streams occasionally drop due to client network loss or server-side interruptions. Today, many parts of the app rely on one-way WebSockets for push updates, and a closed socket isn’t re-established unless the user refreshes the window. This leads to stale UIs (e.g., the agent metadata status bar showing an unknown error) until a manual reload.

2025-09-25 17:27:02.604 [warning] Failed to query metadata: WebSocket closed unexpectedly: undefined undefined

Proposal:
Introduce an automatic reconnection policy for all one-way WebSocket clients:

  • Reconnect withexponential backoff + jitter, capped (e.g., 250ms → 1s → 2s … up to 30s).
  • Stop retrying on non-recoverable close codes (auth errors, 4xx) and surface a clear message.
  • Resume prior subscriptions/state on reconnect; reset backoff after stable activity.
  • Log reconnection attempts.

Expected outcome:
Sockets recover transparently from transient failures; users don’t need to refresh to restore live updates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp