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 incompatibility with JRuby 9K - #356 #529

Conversation

@marianposaceanu
Copy link
Contributor

@marianposaceanu marianposaceanu commented Nov 16, 2017

Currently bunny doesn't work at all with JRuby 9K - when trying to connect it fails with the behaviour described in #356.

This PR fixes that plus a couple of more issues, the integration specs are fully green but the full specs fail so this should be regarded as WIP + feedback on the changes.

Yes we have a valid option for JRuby (March Hare gem) but it would be nice for Bunny at least to function with JRuby 9K even if that implies a bigger overhead than native Java libs - Im thinking for some smaller apps having the full Bunny gem API might be useful.

This switches back to the CPU heavy read_nonblock since readpartial
randomly hangs in JRuby [0]. It also fixes the private method #open
called in JRuby by redefining it in the Socket module. Yet another
fix is to rescue EOFError [1].

[0] - https://gist.github.com/knewter/5818005
[1] - jruby/jruby#1694 (comment)
@michaelklishin michaelklishin merged commit a0ec9e5 into ruby-amqp:master Nov 17, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@michaelklishin
Copy link
Member

@michaelklishin michaelklishin commented Nov 17, 2017

Thank you. I will backport to 2.7.x.

@mach-kernel
Copy link

@mach-kernel mach-kernel commented Nov 20, 2017

I have this same issue, thank you @dakull. Also, buna!

@michaelklishin michaelklishin added this to the 2.8.0 milestone Dec 18, 2017
@michaelklishin
Copy link
Member

@michaelklishin michaelklishin commented Dec 18, 2017

Released in 2.8.0, will do a 2.7.3 later today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.