Author: jfrederic.clere(a)jboss.com
Date: 2008-06-26 04:13:49 -0400 (Thu, 26 Jun 2008)
New Revision: 1729
Modified:
trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
Log:
Prevent using the node before the first (ok) status message.
Use a #define for the time before removing a node.
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-25 15:34:04 UTC
(rev 1728)
+++ trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2008-06-26 08:13:49 UTC
(rev 1729)
@@ -63,6 +63,8 @@
static apr_thread_mutex_t *lock = NULL;
+#define WAITFORREMOVE 10 /* seconds */
+
/*
* Create/Get the worker before using it
*/
@@ -160,7 +162,7 @@
/* XXX: We need that information from TC */
(*worker)->s->redirect[0] = '\0';
}
- (*worker)->s->lbstatus = 1;
+ (*worker)->s->lbstatus = -1; /* prevent using the node using status message */
if (!reuse) {
/*
@@ -1069,7 +1071,7 @@
for (i=0; i<size; i++) {
nodeinfo_t *ou;
node_storage->read_node(id[i], &ou);
- if (ou->mess.remove && (now - ou->updatetime) >=
apr_time_from_sec(10)) {
+ if (ou->mess.remove && (now - ou->updatetime) >=
apr_time_from_sec(WAITFORREMOVE)) {
/* remove the node from the shared memory */
node_storage->remove_node(ou);
}
Show replies by date