]
Bela Ban resolved JGRP-1960.
----------------------------
Resolution: Done
NioConnection: interestOps() called on wrong channel
----------------------------------------------------
Key: JGRP-1960
URL:
https://issues.jboss.org/browse/JGRP-1960
Project: JGroups
Issue Type: Bug
Reporter: Bela Ban
Assignee: Bela Ban
Fix For: 3.6.6
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()}}.