tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r603637 - /tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
Date Wed, 12 Dec 2007 15:10:33 GMT
Author: rjung
Date: Wed Dec 12 07:10:32 2007
New Revision: 603637

URL: http://svn.apache.org/viewvc?rev=603637&view=rev
Log:
Slightly rearange ajp_next_connection().

Modified:
    tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c

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=603637&r1=603636&r2=603637&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Wed Dec 12 07:10:32 2007
@@ -725,14 +725,15 @@
 {
     int rc;
     ajp_worker_t *aw = ae->worker;
-    jk_sock_t sock;
 
+    /* Close previous socket */
+    if (IS_VALID_SOCKET(ae->sd))
+        jk_shutdown_socket(ae->sd, l);
+    /* Mark existing endpoint socket as closed */
+    ae->sd = JK_INVALID_SOCKET;
     JK_ENTER_CS(&aw->cs, rc);
     if (rc) {
         unsigned int i;
-        sock = ae->sd;
-        /* Mark existing endpoint socket as closed */
-        ae->sd = JK_INVALID_SOCKET;
         for (i = 0; i < aw->ep_cache_sz; i++) {
             /* Find cache slot with usable socket */
             if (aw->ep_cache[i] && IS_VALID_SOCKET(aw->ep_cache[i]->sd))
{
@@ -742,9 +743,10 @@
             }
         }
         JK_LEAVE_CS(&aw->cs, rc);
-        /* Close previous socket */
-        if (IS_VALID_SOCKET(sock))
-            jk_shutdown_socket(sock, l);
+        if (IS_VALID_SOCKET(ae->sd))
+            jk_log(l, JK_LOG_INFO,
+                   "(%s) Will try pooled connection sd = %d from slot %d",
+                    ae->worker->name, ae->sd, i);
     }
 }
 



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


Mime
View raw message