Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-1960

NioConnection: interestOps() called on wrong channel

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.6.6
    • None
    • None

      When we accept a connection in NioServer, we set the of key of NioConnection to the one associated with the ServerSocketChannel. Later, when key.interestOps(key.interestOps() | SelectionKet.OP_WRITE) is called, an IllegalArgumentException will be thrown because a ServerSocketChannel doesn't support this op (only OP_ACCEPT).
      SOLUTION: grab the SocketChannel returned from ServerSocketChannel.accept() and use it instead of the ServerSocketChannel to call interestOps().

              rhn-engineering-bban Bela Ban
              rhn-engineering-bban Bela Ban
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: