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

Fix race condition between transport start and initialization #14

Merged
merged 9 commits into from
Oct 16, 2024

Conversation

jspahrsummers
Copy link
Member

@jspahrsummers jspahrsummers commented Oct 11, 2024

This PR standardizes on a Transport.start() method, which Client and Server classes now call automatically. This fixes a race condition between starting the transport (which causes data to start flowing) and being ready to process messages in the client or server.

Calling code should no longer call Transport.start() unless doing low-level things like proxying.

Resolves #2.

To do

  • Figure out how await client.connect() is gonna work

@jspahrsummers jspahrsummers marked this pull request as ready for review October 16, 2024 12:17
@jspahrsummers jspahrsummers merged commit e665be0 into main Oct 16, 2024
2 checks passed
@jspahrsummers jspahrsummers deleted the justin/fix-race-condition branch October 16, 2024 17:24
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.

Race condition between transport start and server connection
2 participants