Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simplify proxy, move seq check to no session path #233

Merged
merged 5 commits into from
Jul 12, 2024

Conversation

jackyzha0
Copy link
Member

@jackyzha0 jackyzha0 commented Jul 12, 2024

Why

  • we hit codepaths where we hit a hard reconnect route and skip over the check where we make sure that the client isn't asking for a session we don't have

What changed

  • simplify ws<>uds proxy to not need to introspect the messages
  • fix the else check in the server so that we properly check clientNextSentSeq > 0 || clientNextExpectedSeq > 0 even if we just went through a hard reconnect
  • change the transparent reconnect test to actually test the right thing

Versioning

  • Breaking protocol change
  • Breaking ts/js API change

@jackyzha0 jackyzha0 requested a review from a team as a code owner July 12, 2024 08:02
@jackyzha0 jackyzha0 requested review from Monkatraz, lhchavez and masad-frost and removed request for a team July 12, 2024 08:02
transport/transport.test.ts Show resolved Hide resolved
transport/transport.test.ts Show resolved Hide resolved
expect(oldClientSessionId).not.toBeUndefined();
expect(oldServerSessionId).not.toBeUndefined();

await advanceFakeTimersBySessionGrace();
Copy link
Contributor

Choose a reason for hiding this comment

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

request: we should also try a reconnect here (that was the OG bug)

Copy link
Member Author

Choose a reason for hiding this comment

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

other test "reconnecting before grace period ends should leave session intact" should cover this

@jackyzha0 jackyzha0 merged commit 8add7a9 into main Jul 12, 2024
4 checks passed
@jackyzha0 jackyzha0 deleted the jackyzha0/move-client-seq-check-outside branch July 12, 2024 18: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.

None yet

2 participants