-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
Having Problems With Celluloid::IO / Nonblocking IO #3520
Comments
For context, this is the error:
Expected: |
Here's the code in question: It looks like it's throwing the wrong exception ( |
It's actually throwing SocketError in other places where it shouldn't: # ruby 2.0.0
> UDPSocket.new.bind "127.0.0.1", 191 #=> Errno::EACCES: Permission denied - bind(2)
# jruby 9.0.4.0
> UDPSocket.new.bind "127.0.0.1", 191 #=> SocketError: bind: name or service not known
from org/jruby/ext/socket/RubyUDPSocket.java:157:in `bind' |
I also think that this is an overall socket handling issue (not only udp): # ruby 2.0.0
> u = TCPSocket.new "127.0.0.1", 22
> u.read_nonblock 22 #=> "Open bla bla"
> u.read_nonblock 22 #=> Errno::EAGAIN: Resource temporarily unavailable - read would block
# jruby 9.0.4.0
> u = TCPSocket.new "127.0.0.1", 22
> u.read_nonblock 22 #=> "Open bla bla"
> u.read_nonblock 22 #=> IO::EAGAINWaitReadable: Resource temporarily unavailable - read would block
from org/jruby/RubyIO.java:2767:in `read_nonblock' |
fixes jruby#3520 (non-blocking IO compatibility)
3cadb0c handles the main issue and there's some more tunings: bdcc08e, 7545673 and 4f9e6be. note that some of MRI's error is not followed blindly e.g. |
Coming from celluloid/celluloid-io#156. Maybe someone reported this already, couldn't find the specific one, but I saw a lot of non-blocking IO related issues.
The text was updated successfully, but these errors were encountered: