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

RubyIO#select puts connectable sockets in the read set instead of write set

    Details

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

      Description

      Perusing RubyIO.select_static(), it puts sockets that have OP_CONNECT set in their SelectionKey#readyOps() flags into the read set instead of the write set as one would expect.

      This is probably not a user-visible bug, since OP_CONNECT is never registered in the interest ops for any write channels, so it should never be set in the ready ops.

      Technically OP_CONNECT probably should be set in the interest ops for IO objects in the write set, but since any socket that connects is also writable, it works as it is anyway.

      Just documenting for future reference.

        Activity

        Hide
        Charles Oliver Nutter added a comment -

        Fixed with recent IO/Socket refactoring work.

        Show
        Charles Oliver Nutter added a comment - Fixed with recent IO/Socket refactoring work.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: