]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
* it might have been possible that a flapping server would not have been
authorwilly tarreau <willy@wtap.(none)>
Thu, 30 Mar 2006 12:06:51 +0000 (14:06 +0200)
committerwilly tarreau <willy@wtap.(none)>
Thu, 30 Mar 2006 13:03:36 +0000 (15:03 +0200)
  detected UP is responding just before being declared down.

haproxy.c

index aba14617138bd522d26b5a188987720c2d840829..9034392655bb9afc82e5318180aed845c526fc45 100644 (file)
--- a/haproxy.c
+++ b/haproxy.c
@@ -5341,6 +5341,8 @@ int process_chk(struct task *t) {
            //fprintf(stderr, "process_chk: 9\n");
            s->health++; /* was bad, stays for a while */
            if (s->health >= s->rise) {
+               s->state |= SRV_RUNNING;
+
                if (s->health == s->rise) {
                     recount_servers(s->proxy);
                    Warning("%sServer %s/%s UP. %d active and %d backup servers online.%s\n",
@@ -5355,7 +5357,6 @@ int process_chk(struct task *t) {
                }
 
                s->health = s->rise + s->fall - 1; /* OK now */
-               s->state |= SRV_RUNNING;
            }
            s->curfd = -1; /* no check running anymore */
            //FD_CLR(fd, StaticWriteEvent);