Skip to content

fix(connected-solid): prevent unintentional resubscription to websocket notifications - #175

Merged
jaxoncreed merged 1 commit into
mainfrom
fix-websocket-subscription-unintentional-reconnect
Oct 15, 2026
Merged

jaxoncreed merged 1 commit into
mainfrom
fix-websocket-subscription-unintentional-reconnect

Conversation

@mrkvon

@mrkvon mrkvon commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator

When connection fails unintentionally, it is retried. However we didn't indicate when disconnect was intentional. So it always retried, even after intentional unsubscriptions. This lead to reconnection attempt after every unsubscribe.

This fix addresses that.

Additionally I tried to improve a possible related race condition by checking this.isManualClose again after a timeout.

I think some race condition still remains:
If connection drops and starts getting established again, and in the meantime the user unsubscribes intentionally, the connection will be reopened and it will flip this.isManualClose back to false.

When connection fails unintentionally, it is retried.
However we didn't indicate when disconnect was intentional.
So it always retried, even after intentional unsubscriptions.
This fix addresses that.

Additionally try to improve a possible related race condition.
@mrkvon mrkvon changed the title fix(connected-solid): unintentional resubscription to ws notifications fix(connected-solid): unintentional resubscription to websocket notifications Oct 12, 2026
@mrkvon mrkvon changed the title fix(connected-solid): unintentional resubscription to websocket notifications fix(connected-solid): prevent unintentional resubscription to websocket notifications Oct 12, 2026

@jaxoncreed jaxoncreed left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jaxoncreed
jaxoncreed merged commit 5e9f0b5 into main Oct 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants