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 2015/01/06 15:08:04 UTC

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

Author: rjung
Date: Tue Jan  6 14:08:04 2015
New Revision: 1649806

URL: http://svn.apache.org/r1649806
Log:
Don't update last access time of worker
connections during optional checking of
idle connections using CPing.

Updating the time stamp breaks closing
idle connections.

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

Modified: tomcat/jk/trunk/native/common/jk_ajp_common.c
URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_ajp_common.c?rev=1649806&r1=1649805&r2=1649806&view=diff
==============================================================================
--- tomcat/jk/trunk/native/common/jk_ajp_common.c (original)
+++ tomcat/jk/trunk/native/common/jk_ajp_common.c Tue Jan  6 14:08:04 2015
@@ -3321,7 +3321,6 @@ int JK_METHOD ajp_maintain(jk_worker_t *
 
     if (pThis && pThis->worker_private) {
         ajp_worker_t *aw = pThis->worker_private;
-        time_t now = mstarted;
         int i;
         long delta;
         unsigned int n = 0, k = 0, cnt = 0;
@@ -3409,7 +3408,7 @@ int JK_METHOD ajp_maintain(jk_worker_t *
                  */
                 if (IS_SLOT_AVAIL(aw->ep_cache[i]) &&
                     IS_VALID_SOCKET(aw->ep_cache[i]->sd)) {
-                    int elapsed = (int)difftime(now, aw->ep_cache[i]->last_access);
+                    int elapsed = (int)difftime(mstarted, aw->ep_cache[i]->last_access);
                     if (elapsed > aw->conn_ping_interval) {
                         k++;
                         /* handle cping/cpong.
@@ -3428,10 +3427,6 @@ int JK_METHOD ajp_maintain(jk_worker_t *
                             aw->ep_cache[i]->sd = JK_INVALID_SOCKET;
                             ajp_reset_endpoint(aw->ep_cache[i], l);
                         }
-                        else {
-                            now = time(NULL);
-                            aw->ep_cache[i]->last_access = now;
-                        }
                     }
                 }
             }

Modified: tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml?rev=1649806&r1=1649805&r2=1649806&view=diff
==============================================================================
--- tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml Tue Jan  6 14:08:04 2015
@@ -184,6 +184,11 @@
         Apache: Improve log handling during graceful or normal restart.
         (rjung)
       </fix>
+      <fix>
+        Don't update last access time of worker connections during optional
+        checking of idle connections using CPing. Updating the time stamp
+        breaks closing idle connections. (rjung)
+      </fix>
     </changelog>
   </subsection>
 </section>



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