You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2003/01/01 14:55:22 UTC

cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net PoolTcpEndpoint.java

remm        2003/01/01 05:55:22

  Modified:    util/java/org/apache/tomcat/util/net PoolTcpEndpoint.java
  Log:
  - Don't check for null on the connection (it should never be null, and should be
    caught by the throwable and logged if it happens).
  - Fix a problem when using SSL: when an exception occurs during the handshake,
    if continue is used, the thread will immediately start to listen on the socket,
    for no good reason. I found that patch on tomcat-user, alledgedly submitted
    by Xiaojian Wang (I couldn't find the original message), and reposted
    by Carl Zetterberg.
  
  Revision  Changes    Path
  1.11      +5 -7      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.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- PoolTcpEndpoint.java	19 Dec 2002 15:55:45 -0000	1.10
  +++ PoolTcpEndpoint.java	1 Jan 2003 13:55:22 -0000	1.11
  @@ -519,12 +519,12 @@
                           endpoint.getServerSocketFactory().handshake(s);
    		    }
                   } catch (Throwable t) {
  -                    endpoint.log.info("Handshake failed", t);
  +                    endpoint.log.debug("Handshake failed", t);
                       // Try to close the socket
                       try {
                           s.close();
                       } catch (IOException e) {}
  -                    continue;
  +                    break;
                   }
   
                   TcpConnection con = null;
  @@ -536,8 +536,6 @@
   		    } else {
                           con = (TcpConnection) perThrData[0];
                           perThrData = (Object []) perThrData[1];
  -                        if ( con == null )
  -                            continue;
   		    }
   		    
   		    con.setEndpoint(endpoint);
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>