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

TCPSocket#read_nonblock hangs #338

Closed
mmmries opened this Issue Feb 28, 2014 · 3 comments

Comments

Projects
None yet
3 participants
@mmmries
Copy link
Contributor

mmmries commented Feb 28, 2014

In my efforts to get Puma running I came across a problem with trying to read from TCP sockets (perhaps other IO objects as well?)

I put together a minimum reproducible here: https://gist.github.com/hqmq/9278656

That basically just sets up two threads (a server and a client) and then attempts to use TCPSocket#read_nonblock.

Any ideas where I should start looking?

@johnnyt

This comment has been minimized.

Copy link
Member

johnnyt commented Feb 28, 2014

@mmmries

This comment has been minimized.

Copy link
Contributor Author

mmmries commented Mar 1, 2014

I think I actually found a fix for this. I live inspected an TCPSocket object in maglev irb and saw that it had a rcv_nonblock function so I just made read_nonblock delegate to rcv_nonblock and suddenly my failing spec passes!

@rjsargent

This comment has been minimized.

Copy link

rjsargent commented Mar 1, 2014

That's great!
On Feb 28, 2014 4:38 PM, "Michael" notifications@github.com wrote:

I think I actually found a fix for this. I live inspected an TCPSocket
object in maglev irb and saw that it had a rcv_nonblock function so I
just made read_nonblock delegate to rcv_nonblock and suddenly my failing
spec passes!

Reply to this email directly or view it on GitHubhttps://github.com//issues/338#issuecomment-36409371
.

@mmmries mmmries closed this Mar 1, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment