[jboss-jira] [JBoss JIRA] (JGRP-1960) NioConnection: interestOps() called on wrong channel
Bela Ban (JIRA)
issues at jboss.org
Fri Sep 4 03:25:00 EDT 2015
[ https://issues.jboss.org/browse/JGRP-1960?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13105452#comment-13105452 ]
Bela Ban commented on JGRP-1960:
--------------------------------
This is not a critical bug and *does not cause incorrect behavior*, as an {{NioConnection.send()}} which fails and tries to register an OP_WRITE will throw an IllegalArgumentException. However, that exception causes the connection to be closed, removed and re-established; this time via a connect to the peer (SocketChannel).
Since JGroups performs retransmission at the uper layers, the message will eventually be resent. This doesn't apply to messages emitted from protocols below {{UNICAST3}} though...
> 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