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

multicast receive broken everywhere #5678

Merged
merged 3 commits into from Apr 8, 2019
Merged

multicast receive broken everywhere #5678

merged 3 commits into from Apr 8, 2019

Conversation

@enebo
Copy link
Member

@enebo enebo commented Apr 5, 2019

This is an attempt at fixing #5656. I could not get the reporters server code to work on linux much less the other platforms referenced. I believe it was something underneath this source line in original code:

socket.multicastStateManager.getMulticastSocket().getChannel();

in Java source of getChannel() is literally 'return null'. Based on changes over the years I suspect something changed in our implementation (like maybe we subclassed the channel?). This version just uses the socket itself to receive and it blocks and also seems to work. I also added the equivalent logic if somehow the socket is in a messed up state and tried to mark itself as non-blocking.

With that said I am not confident so I need some eyeballs...

@enebo enebo added this to the JRuby 9.2.7.0 milestone Apr 5, 2019
@enebo enebo requested review from headius and kares Apr 5, 2019
@headius
headius approved these changes Apr 6, 2019
Copy link
Member

@headius headius left a comment

Looks fine to me!

@headius
Copy link
Member

@headius headius commented Apr 6, 2019

Just to confirm, you tested that this works on Windows? I noticed the original test was masked on Windows.

@enebo
Copy link
Member Author

@enebo enebo commented Apr 7, 2019

@headius I tried it and it does not seem to work so I should probably mask it out until I can figure that out. This is plain old Java socket stuff so I half wonder if this ever worked on windows. The reporter implied it used to work but I guess I need to try 1.7 and see.

@kares
kares approved these changes Apr 8, 2019
@enebo enebo merged commit 58154d3 into master Apr 8, 2019
1 of 3 checks passed
1 of 3 checks passed
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details
@azure-pipelines
jruby.jruby Build #20190408.3 succeeded
Details
@headius headius deleted the recvfrom_multicast branch Apr 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants