Skip to content

Bug: WebSocketRelayer.state.reconnecting stays true forever once reconnection permanently gives up #516

Description

@Jaydbrown

src/relayer/WebSocketRelayer.ts:53-60:

reconnecting: this.reconnectAttempts > 0,

After maxReconnectAttempts failed attempts, shouldAttemptReconnect() returns false and no further attempts are made — but this.reconnectAttempts === this.maxReconnectAttempts, which is > 0, so state.reconnecting reports true indefinitely.

Impact

A UI driven by state/onStateChange shows a permanent "reconnecting…" spinner when the relayer has actually given up and is dead. There is no state that means "disconnected, not retrying".

Suggested fix

Track an explicit gaveUp flag (or transition to 'disconnected' and emit it) when the retry budget is exhausted, and compute reconnecting from the actual retry loop being live.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave programbugSomething isn't workingpriority: mediumMissing feature or UX issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions