[jboss-jira] [JBoss JIRA] (JGRP-1960) NioConnection: interestOps() called on wrong channel

Bela Ban (JIRA) issues at jboss.org
Mon Sep 7 05:32:00 EDT 2015


     [ https://issues.jboss.org/browse/JGRP-1960?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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()}}.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list