You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by rj...@apache.org on 2008/01/01 23:46:02 UTC

svn commit: r607932 - in /tomcat/connectors/trunk/jk: native/common/jk_ajp_common.c xdocs/miscellaneous/changelog.xml

Author: rjung
Date: Tue Jan  1 14:46:01 2008
New Revision: 607932

URL: http://svn.apache.org/viewvc?rev=607932&view=rev
Log:
Add missing prepost cping/cpong directly after connect
in case prepost cping is used, but no connect cping.

Modified:
    tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
    tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml

Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?rev=607932&r1=607931&r2=607932&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Tue Jan  1 14:46:01 2008
@@ -1363,7 +1363,24 @@
             JK_TRACE_EXIT(l);
             return JK_FATAL_ERROR;
         }
-        /* Send the request.
+        if (ae->worker->connect_timeout <= 0 &&
+            ae->worker->prepost_timeout > 0) {
+            /* handle cping/cpong if prepost_timeout is set
+             * and we didn't already do a connect cping/cpong.
+             */
+            if (ajp_handle_cping_cpong(ae,
+                        ae->worker->prepost_timeout, l) == JK_FALSE) {
+                jk_log(l, JK_LOG_INFO,
+                       "(%s) failed sending request, "
+                       "socket %d prepost cping/cpong failure (errno=%d)",
+                        ae->worker->name, ae->sd, ae->last_errno);
+                JK_TRACE_EXIT(l);
+                return JK_FATAL_ERROR;
+            }
+        }
+
+        /* We've got a connected socket and the optional
+         * cping/cpong worked, so let's send the request now.
          */
         rc = ajp_connection_tcp_send_message(ae, op->request, l);
         /* Error during sending the request.

Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?rev=607932&r1=607931&r2=607932&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Tue Jan  1 14:46:01 2008
@@ -44,6 +44,10 @@
   <subsection name="Native">
     <changelog>
       <update>
+        Common: Add missing prepost cping/cpong directly after connect
+        in case prepost cping is used, but no connect cping. (rjung)
+      </update>
+      <update>
         Apache: Enhance robustness of message formating in jk_error_exit(). (rjung)
       </update>
       <fix>



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