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

Avoid triggering a segfault due to a read/close race #25

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

matthewd
Copy link

@matthewd matthewd commented Oct 6, 2016

A well-timed pair of threads can trigger a segfault if they call close and read on the same IO at the same time.

It's easy to avoid that with a tiny rearrangement: we can just make sure we shut down the read thread before we close the socket.

No new test, because it's not that easy to trigger on demand.

Kill the read thread, and wait for it to die, before we close the
socket.
@unasuke
Copy link
Contributor

unasuke commented Dec 30, 2021

@matthewd This repository was moved ruby-jp/websocket-client-simple. If you still need this, make pull request or issue to ruby-jp/websocket-client-simple again, thx.

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