Author: jfrederic.clere(a)jboss.com
Date: 2008-06-02 12:45:07 -0400 (Mon, 02 Jun 2008)
New Revision: 1648
Modified:
trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
Log:
Don't add if alredy there.
Add missing worker++.
Modified: trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
===================================================================
--- trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2008-06-02 11:55:05 UTC
(rev 1647)
+++ trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2008-06-02 16:45:07 UTC
(rev 1648)
@@ -74,6 +74,7 @@
{
char url[6+64+7+4]; /* Type :// Host : Port */
char *ptr;
+ int reuse = 0;
/* build the name (scheme and port) when needed */
strcpy(url, node->mess.Type);
@@ -98,6 +99,7 @@
/* We are going to reuse a removed one */
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, server,
"Created: reusing worker for %s", url);
+ reuse = 1;
} else {
return; /* Done Already existing */
}
@@ -134,7 +136,8 @@
(*worker)->s->redirect[0] = '\0';
}
- my_ap_proxy_add_worker_to_balancer(conf->pool, balancer, *worker);
+ if (!reuse)
+ my_ap_proxy_add_worker_to_balancer(conf->pool, balancer, *worker);
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, server,
"Created: worker for %s %d (status): %d", url,
(*worker)->id, (*worker)->s->status);
}
@@ -818,6 +821,7 @@
for (i = 0; i < conf->workers->nelts; i++) {
if (worker->id == id)
break;
+ worker++;
}
if (i == conf->workers->nelts) {
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
Show replies by date