JRuby (please use github issues at http://bugs.jruby.org)
  1. JRuby (please use github issues at http://bugs.jruby.org)
  2. JRUBY-6527

Socket#connect_nonblock raises Errno::EINPROGRESS, but MRI raises IO::WaitWritable

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.6.7
    • Fix Version/s: JRuby 1.7.0.pre1
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Under MRI ruby 1.9.x, the docs say connect_nonblock will raise IO::WaitWritable -

      http://www.ruby-doc.org/stdlib-1.9.3/libdoc/socket/rdoc/Socket.html#method-i-connect_nonblock

      JRuby raises Errno::EINPROGRESS.

      To be fair, I believe that under 1.8.x, ruby would raise Errno::EINPROGRESS.

        Activity

        Hide
        Charles Oliver Nutter added a comment -

        This is fixed on master (1.7) only since we're not planning a JRuby 1.6.8 right now.

        JRuby:

        commit ce2282e2f6b62af492c425164027a3a6d28dcb66
        Author: Charles Oliver Nutter <headius@headius.com>
        Date:   Tue Mar 6 16:38:55 2012 -0600
        
            Fix JRUBY-6527
            
            Socket#connect_nonblock raises Errno::EINPROGRESS, but MRI raises IO::WaitWritable
            
            This is just another case where MRI mixes WaitWritable into an
            errno exception at runtime, so I added another subclass that does
            it ahead of time and construct that in 1.9 mode.
        
        Show
        Charles Oliver Nutter added a comment - This is fixed on master (1.7) only since we're not planning a JRuby 1.6.8 right now. JRuby: commit ce2282e2f6b62af492c425164027a3a6d28dcb66 Author: Charles Oliver Nutter <headius@headius.com> Date: Tue Mar 6 16:38:55 2012 -0600 Fix JRUBY-6527 Socket#connect_nonblock raises Errno::EINPROGRESS, but MRI raises IO::WaitWritable This is just another case where MRI mixes WaitWritable into an errno exception at runtime, so I added another subclass that does it ahead of time and construct that in 1.9 mode.
        Hide
        Charles Oliver Nutter added a comment -

        Also sent RubySpec pull request: https://github.com/rubyspec/rubyspec/pull/122

        Show
        Charles Oliver Nutter added a comment - Also sent RubySpec pull request: https://github.com/rubyspec/rubyspec/pull/122

          People

          • Assignee:
            Charles Oliver Nutter
            Reporter:
            Jordan Sissel
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: