Skip to content

[Bug] WebSocket connection timeout uses a hardcoded value instead of the shared constant #723

Closed

Description

@akramcodez

Description

The WebSocket client uses a hardcoded 5000 ms timeout instead of the shared timeout constant already defined in the codebase. This creates an unnecessary maintenance point if the timeout value is updated elsewhere.

Environment

  • OS: Any
  • Node version: Any
  • Nanocoder version: Latest
  • Provider: Any
  • Model: Any

Steps to Reproduce

  1. Open websocket-client.ts.
  2. Locate the connection timeout implementation.
  3. Compare the timeout value with the shared timeout constant defined in constants.ts.

Expected Behavior

The WebSocket client should use the shared timeout constant instead of a hardcoded value.

Actual Behavior

The timeout is hardcoded to 5000 ms.

Logs/Screenshots

N/A

Additional Context

  • Using the shared constant keeps timeout values consistent across the codebase.
  • Future timeout changes would only need to be made in one location.
  • Note: This is primarily a maintainability improvement rather than a functional bug.
  • Note: This issue is intentionally kept small and is suitable for first-time contributors. If you're interested in working on it, please leave a comment below and ask to be assigned before opening a pull request.

Activity

  1. added
    bug
    good first issue
    on Jul 31, 2026
  2. Guflly commented on Jul 31, 2026

    @Guflly

    I can take this.

  3. AaryanCdry commented on Jul 31, 2026

    @AaryanCdry
    Contributor

    Hi! I'd like to work on this issue — replacing the hardcoded 5000 ms WebSocket timeout with the shared constant from constants.ts looks like a clean, small change. Could I be assigned? I'll open a PR shortly.

  4. added a commit that references this issue on Jul 31, 2026
    d895ebe
  5. added a commit that references this issue on Aug 3, 2026
    5cf3062
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

buggood first issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions