Using OP_CONNECT with Selector.select causes selector to fire repeatedly

Deven You youdwei at linux.vnet.ibm.com
Thu May 31 00:47:13 PDT 2012


Hi Alan,

Thanks for your comments. How do you feel the javadoc change should be, 
from my knowledge, for the Selector.select(), we may add a sentence like 
"For OP_CONNECT, once a channel is already connected, an application  
should not check OP_CONNECT again, in this situation, Selector will 
ignore OP_CONNECT and return immediately."

On 05/16/2012 04:40 AM, Alan Bateman wrote:
> Devon,
>
> Just to follow up from my previous mail. I looked at the changes in 
> the patch and also tried it out to see the side effects. One issue is 
> that the changes mean that OP_CONNECT will be "automatically" removed 
> from the interest ops, minimally that would require a spec change. 
> When I ran the Selector tests (in the jdk repository) then I noticed a 
> few failures so there are other side effects too. In any case, I think 
> the one is really just a mis-use of the API and that we should instead 
> adding wording to the javadoc rather than change the implementation.
>
> -Alan
>


-- 
Best Regards,

Deven



More information about the nio-dev mailing list