remm 2002/11/28 07:16:32 Modified: util/java/org/apache/tomcat/util/net PoolTcpEndpoint.java Log: - Small reorganization of the code so that the next accept is called sooner when not using the connection cache. Revision Changes Path 1.8 +9 -12 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java Index: PoolTcpEndpoint.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- PoolTcpEndpoint.java 28 Nov 2002 11:24:28 -0000 1.7 +++ PoolTcpEndpoint.java 28 Nov 2002 15:16:31 -0000 1.8 @@ -489,13 +489,7 @@ } public void runIt(Object perThrData[]) { - TcpConnection con=null; - if( ! usePool ) { - // extract the original. - con=(TcpConnection) perThrData[0]; - perThrData = (Object []) perThrData[1]; - } - + // Create per-thread cache while(endpoint.isRunning()) { Socket s = null; @@ -521,14 +515,17 @@ continue; } + TcpConnection con = null; try { if( usePool ) { con=(TcpConnection)connectionCache.get(); if( con == null ) con = new TcpConnection(); } else { - if( con==null ) - continue; + con = (TcpConnection) perThrData[0]; + perThrData = (Object []) perThrData[1]; + if ( con == null ) + continue; } con.setEndpoint(endpoint);
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>