Skip to content

Bug: GraphQLIndexer.subscribe dies silently on WebSocket close #514

Description

@Jaydbrown

src/indexer.ts:207-211:

socket.onclose = () => {
  if (!unsubscribed && !this.isDestroyed) {
    subscription.unsubscribe();
  }
};

A transient network drop closes the socket → the subscription is torn down permanently. There is no reconnect and no onError call — the consumer's onData just stops firing with no signal.

Impact

Live indexer-backed views (stream lists, dashboards) go stale on the first Wi-Fi blip and never recover until the page is reloaded. Related: #211.

Suggested fix

On an unexpected close, invoke options.onError and attempt reconnection with backoff (mirroring WebSocketRelayer), only tearing down permanently after a retry budget is exhausted or unsubscribe() was called.

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