Skip to content

fix: mark connection connected after successful join - #248

Open
knownasrazi wants to merge 1 commit into
shipgirlproject:masterfrom
knownasrazi:fix/connection-state-connected
Open

knownasrazi wants to merge 1 commit into
shipgirlproject:masterfrom
knownasrazi:fix/connection-state-connected

Conversation

@knownasrazi

Copy link
Copy Markdown

Connection.connect() moves the state to CONNECTING but never sets CONNECTED once the session is ready, so a fully joined connection reads as connecting forever. That also makes a second connect() call return early as if a join were still in progress.

It now flips to CONNECTED after SESSION_READY is confirmed. Failure paths are untouched and still reset to DISCONNECTED.

I verified it by driving a real Connection through a successful join with a stubbed connector: state stayed CONNECTING before, reads CONNECTED after. tsc, oxfmt --check and eslint all pass.

connect() moved the state to CONNECTING but never set CONNECTED once the session was ready, so the connection read as connecting forever. It now flips to CONNECTED after SESSION_READY is confirmed.
@knownasrazi
knownasrazi requested a review from Deivu as a code owner September 19, 2026 19:02
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.

1 participant