Fixed bug where OP interest is different for the first time the key is used, hence...
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 30 Oct 2006 16:47:10 +0000 (16:47 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 30 Oct 2006 16:47:10 +0000 (16:47 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@469189 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/tomcat/util/net/NioEndpoint.java

index e550388..10c2deb 100644 (file)
@@ -1129,6 +1129,7 @@ public class NioEndpoint {
             final KeyAttachment ka = key!=null?key:new KeyAttachment();
             ka.reset(this,socket);
             PollerEvent r = eventCache.poll();
+            ka.interestOps(SelectionKey.OP_READ);//this is what OP_REGISTER turns into.
             if ( r==null) r = new PollerEvent(socket,ka,OP_REGISTER);
             else r.reset(socket,ka,OP_REGISTER);
             addEvent(r);