You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ji...@apache.org on 2006/12/08 18:41:10 UTC

svn commit: r484669 - /tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c

Author: jim
Date: Fri Dec  8 09:41:09 2006
New Revision: 484669

URL: http://svn.apache.org/viewvc?view=rev&rev=484669
Log:
The action is always the same on the 3 conditionals,
so why make it appear they are different? Make the code
more clear.

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=484669&r1=484668&r2=484669
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Fri Dec  8 09:41:09 2006
@@ -840,12 +840,10 @@
                 rec->s->busy++;
                 if (rec->s->busy > rec->s->max_busy)
                     rec->s->max_busy = rec->s->busy;
-                if (p->worker->lbmethod == JK_LB_METHOD_REQUESTS)
-                    rec->s->lb_value += rec->s->lb_mult;
-                else if (p->worker->lbmethod == JK_LB_METHOD_SESSIONS &&
-                         !sessionid)
-                    rec->s->lb_value += rec->s->lb_mult;
-                else if (p->worker->lbmethod == JK_LB_METHOD_BUSYNESS)
+                if ( (p->worker->lbmethod == JK_LB_METHOD_REQUESTS) ||
+                     (p->worker->lbmethod == JK_LB_METHOD_BUSYNESS) ||
+                     (p->worker->lbmethod == JK_LB_METHOD_SESSIONS &&
+                      !sessionid) )
                     rec->s->lb_value += rec->s->lb_mult;
                 if (p->worker->lblock == JK_LB_LOCK_PESSIMISTIC)
                     jk_shm_unlock();



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