Skip to content

Conversation

@DTCurrie
Copy link
Member

Sessions were unconditionally reset on every reconnection, even when reusing the same credentials. This caused authentication context mismatches and unnecessary session churn.

This PR modifies client.ts to conditionally reset sessions only when:

  • Credentials have changed
  • No credentials are provided
  • Sessions are explicitly disabled

This PR also introduces unit-tests to cover expected behaviors for the client's session management.

@DTCurrie DTCurrie self-assigned this Oct 31, 2025
@DTCurrie DTCurrie requested a review from a team as a code owner October 31, 2025 22:23
@DTCurrie DTCurrie requested review from lia-viam and njooma and removed request for a team October 31, 2025 22:23
@DTCurrie DTCurrie changed the title fix session reset on reconnection with saved creds Fix session reset on reconnection with saved creds Oct 31, 2025
Copy link
Member

@njooma njooma left a comment

Choose a reason for hiding this comment

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

Is this something we should do in other SDKs as well?

@DTCurrie
Copy link
Member Author

DTCurrie commented Nov 4, 2025

Is this something we should do in other SDKs as well?

Good question, I did not dive any deeper than the TS SDK. It was a todo from a long-closed ticket so may be worth taking a look at how other SDKs are handling this?

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.

3 participants