users@grizzly.java.net

Re: Register 0 op in TCPSelectorHandler

From: Oleksiy Stashok <Oleksiy.Stashok_at_Sun.COM>
Date: Mon, 05 Oct 2009 10:43:58 +0200

Hi Sebastian,

> I'm trying to run grizzly on a non-Sun JVM and run into a problem
> which is caused by registering 0 as an channel operation. The
> problem is triggered at TCPSelectorHandler line 462 where 0 is
> applied as an argument to register().
> SocketChannel.validOps() returns which operations are valid and 0 is
> not one of them.
>
> I'm using a patch where I just use SelectionKey.OP_WRITE instead of
> 0, which works fine for me and also passes all unit tests.
>
> Any suggestions?
I think registering 0 should work fine, because it actually means
deregister *all* interests. Do you see any exception, when registering
0 interest?

Thanks.

WBR,
Alexey.

>
>
> Thanks
> Sebastian
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>