Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 2249 invoked from network); 13 Apr 2007 19:16:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Apr 2007 19:16:33 -0000 Received: (qmail 41507 invoked by uid 500); 13 Apr 2007 19:16:35 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 41467 invoked by uid 500); 13 Apr 2007 19:16:35 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 41456 invoked by uid 500); 13 Apr 2007 19:16:35 -0000 Delivered-To: apmail-jakarta-tomcat-dev@jakarta.apache.org Received: (qmail 41453 invoked by uid 99); 13 Apr 2007 19:16:35 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Apr 2007 12:16:35 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Apr 2007 12:16:29 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id F0BE71A983E; Fri, 13 Apr 2007 12:16:08 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: tomcat-dev@jakarta.apache.org From: fhanik@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070413191608.F0BE71A983E@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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