Author: mturk
Date: Fri Sep  8 01:32:27 2006
New Revision: 441433

URL: http://svn.apache.org/viewvc?view=rev&rev=441433
Log:
Make sure we don't have infinite loop when forced
recovery marks all workers in error state again.
This mens, that even we forced recovery, all workers
are still in error state.

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

Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c?view=diff&rev=441433&r1=441432&r2=441433
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Fri Sep  8 01:32:27 
2006
@@ -699,6 +699,7 @@
     worker_record_t *prec = NULL;
     int num_of_workers;
     int first = 1;
+    int was_forced = 0;
     int rc = -1;
     char *sessionid = NULL;
 
@@ -956,15 +957,15 @@
         }
         else {
             /* NULL record, no more workers left ... */
-            if (attempt == 0) {
+            if (attempt == 0 && !was_forced) {
                 int nf;
                 /* Force recovery only on first attempt.
                  * If the second fails, Tomcat is still disconnected.
                  */
-                 jk_shm_lock();
-                 nf = force_recovery(p->worker, l);
-                 jk_shm_unlock();
-
+                jk_shm_lock();
+                nf = force_recovery(p->worker, l);
+                jk_shm_unlock();
+                was_forced = 1;
                 if (nf) {
                     /* We have forced recovery.
                      * Reset the service loop and go again



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to