On Mon, 2005-12-26 at 19:07 -0700, Tom Tromey wrote: > This looks ok to me. > > Anthony> + if ( > ((SocketChannel)key.channel()).isConnected ()) > > Spacing here is wrong.
Thanks. Applied with the following corrected patch... 2005-12-26 Anthony Green <[EMAIL PROTECTED]> * gnu/java/nio/SelectorImpl.java (select): Handle OP_CONNECT properly. Index: gnu/java/nio/SelectorImpl.java =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/java/nio/SelectorImpl.java,v retrieving revision 1.19 diff -u -r1.19 SelectorImpl.java --- gnu/java/nio/SelectorImpl.java 2 Jul 2005 20:32:13 -0000 1.19 +++ gnu/java/nio/SelectorImpl.java 27 Dec 2005 02:33:17 -0000 @@ -284,19 +284,18 @@ // Set new ready write ops for (int i = 0; i < write.length; i++) { - if (key.getNativeFD() == write[i]) - { - ops = ops | SelectionKey.OP_WRITE; - - // if (key.channel ().isConnected ()) - // { - // ops = ops | SelectionKey.OP_WRITE; - // } - // else - // { - // ops = ops | SelectionKey.OP_CONNECT; - // } - } + if (key.getNativeFD() == write[i]) + { + if (key.channel() instanceof SocketChannel) + { + if (((SocketChannel) key.channel ()).isConnected ()) + ops = ops | SelectionKey.OP_WRITE; + else + ops = ops | SelectionKey.OP_CONNECT; + } + else + ops = ops | SelectionKey.OP_WRITE; + } } // FIXME: We dont handle exceptional file descriptors yet. _______________________________________________ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches