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

Shutdown race condition work-around #1263

Conversation

SeanMollet
Copy link

@SeanMollet SeanMollet commented Sep 27, 2024

I doubt this is the best possible solution to the race condition, but I couldn't find anything else that was really viable, since we're waiting for the callback to get called by the main loop.

Adding a small delay (100ms) to TcpTransport::process allows the packets to get processed before we tear down the callbacks, etc.

@SeanMollet
Copy link
Author

Fixes #1260

Copy link
Owner

@paullouisageneau paullouisageneau left a comment

Choose a reason for hiding this comment

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

Thank you but adding a delay is definitely not a solution, especially because this blocks the entire poll service, meaning it blocks reception for all WebSockets.

@SeanMollet
Copy link
Author

Better fix provided by Paul-Louis. closing.

@SeanMollet SeanMollet closed this Oct 2, 2024
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