tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lar...@apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/server Ajp13.java
Date Wed, 10 Oct 2001 01:52:44 GMT
larryi      01/10/09 18:52:44

  Modified:    src/share/org/apache/tomcat/modules/server Ajp13.java
  Log:
  Apply patch supplied by Henri Gomez.
  
  The ajp13 connection is a persistant connection
  which is created by the WebServer, Apache for exemple.
  
  When you get many hit, Apache create many http childs
  which in turn will create ajp13 connections and so
  ajp13 threads.
  
  Later Apache will kill its child and so the ajp13
  connection will be dropped .
  
  So, in early stage receiveNext(), we could receive
  an IOException since the remote (WebServer) has closed
  the connection.
  
  It's not an error, and we shoudln't get an Exception here.
  
  Revision  Changes    Path
  1.31      +11 -1     jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Ajp13.java
  
  Index: Ajp13.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Ajp13.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- Ajp13.java	2001/10/09 17:59:58	1.30
  +++ Ajp13.java	2001/10/10 01:52:44	1.31
  @@ -269,7 +269,17 @@
       {
   	// XXX The return values are awful.
   
  -	int err = receive(hBuf);
  +        int err = 0;
  +
  +        // if we receive an IOException here, it must be because 
  +        // the remote just closed the ajp13 connection, and it's not
  +        // an error, we just need to close the AJP13 connection
  +        try {
  +	        err = receive(hBuf);
  +        }
  +        catch (IOException ioe) {
  +            return -1;  // Indicate it's a disconnection from the remote end
  +        }
   
       // if any error, just drop the ajp13 connection
   	if (err < 0) 
  
  
  

Mime
View raw message