tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gl...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net PoolTcpEndpoint.java
Date Wed, 22 Oct 2003 13:46:28 GMT
glenn       2003/10/22 06:46:28

  Modified:    util/java/org/apache/tomcat/util/net PoolTcpEndpoint.java
  Log:
  SocketExceptions can occur in a networked app.
  No need to log a stack trace, just log the remote host
  name/ip and the exception message. Then there is less
  cruft in the logs.
  
  Revision  Changes    Path
  1.25      +11 -3     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.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- PoolTcpEndpoint.java	12 Oct 2003 21:15:53 -0000	1.24
  +++ PoolTcpEndpoint.java	22 Oct 2003 13:46:28 -0000	1.25
  @@ -587,6 +587,14 @@
   		    con.setSocket(s);
   		    endpoint.setSocketOptions( s );
   		    endpoint.getConnectionHandler().processConnection(con, perThrData);
  +                } catch (SocketException se) {
  +                    endpoint.log.error(
  +                       "Remote Host " + s.getInetAddress() +
  +                       " SocketException: " + se.getMessage());
  +                    // Try to close the socket
  +                    try {
  +                        s.close();
  +                    } catch (IOException e) {}
                   } catch (Throwable t) {
                       endpoint.log.error("Unexpected error", t);
                       // Try to close the socket
  
  
  

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


Mime
View raw message