tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fha...@apache.org
Subject svn commit: r528605 - /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
Date Fri, 13 Apr 2007 19:16:08 GMT
Author: fhanik
Date: Fri Apr 13 12:16:08 2007
New Revision: 528605

URL: http://svn.apache.org/viewvc?view=rev&rev=528605
Log:
remove redundant calls, easier to track usage

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?view=diff&rev=528605&r1=528604&r2=528605
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Fri Apr 13 12:16:08
2007
@@ -1381,9 +1381,6 @@
             else r.reset(socket,ka,OP_REGISTER);
             addEvent(r);
         }
-        public void cancelledKey(SelectionKey key, SocketStatus status) {
-            cancelledKey(key, status, true);
-        }
         public void cancelledKey(SelectionKey key, SocketStatus status, boolean dispatch)
{
             try {
                 if ( key == null ) return;//nothing to do
@@ -1533,10 +1530,10 @@
                     } 
                 } else {
                     //invalid key
-                    cancelledKey(sk, SocketStatus.ERROR);
+                    cancelledKey(sk, SocketStatus.ERROR,false);
                 }
             } catch ( CancelledKeyException ckx ) {
-                cancelledKey(sk, SocketStatus.ERROR);
+                cancelledKey(sk, SocketStatus.ERROR,false);
             } catch (Throwable t) {
                 log.error("",t);
             }
@@ -1607,9 +1604,9 @@
                 try {
                     KeyAttachment ka = (KeyAttachment) key.attachment();
                     if ( ka == null ) {
-                        cancelledKey(key, SocketStatus.ERROR); //we don't support any keys
without attachments
+                        cancelledKey(key, SocketStatus.ERROR,false); //we don't support any
keys without attachments
                     } else if ( ka.getError() ) {
-                        cancelledKey(key, SocketStatus.ERROR);
+                        cancelledKey(key, SocketStatus.ERROR,true);
                     }else if ((ka.interestOps()&SelectionKey.OP_READ) == SelectionKey.OP_READ)
{
                         //only timeout sockets that we are waiting for a read from
                         long delta = now - ka.getLastAccess();
@@ -1622,14 +1619,14 @@
                         } else if (isTimedout) {
                             key.interestOps(0); 
                             ka.interestOps(0); //avoid duplicate timeout calls
-                            cancelledKey(key, SocketStatus.TIMEOUT);
+                            cancelledKey(key, SocketStatus.TIMEOUT,true);
                         } else {
                             long nextTime = now+(timeout-delta);
                             nextExpiration = (nextTime < nextExpiration)?nextTime:nextExpiration;
                         }
                     }//end if
                 }catch ( CancelledKeyException ckx ) {
-                    cancelledKey(key, SocketStatus.ERROR);
+                    cancelledKey(key, SocketStatus.ERROR,false);
                 }
             }//for
             if ( log.isDebugEnabled() ) log.debug("Poller processed "+keycount+" keys through
timeout");



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message