]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: queue: properly report redistributed connections
authorWilly Tarreau <w@1wt.eu>
Wed, 21 Oct 2020 09:54:38 +0000 (11:54 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 21 Oct 2020 10:04:53 +0000 (12:04 +0200)
In commit 5cd4bbd7a ("BUG/MAJOR: threads/queue: Fix thread-safety issues
on the queues management") the counter of transferred connections was
accidently lost, so that when a server goes down with connections in its
queue, it will always be reported that 0 connection were transferred.

This should be backported as far as 1.8 since the patch above was
backported there.

src/queue.c

index afc2ab8cf027fa76f5a51894f71ecb1a505d0d23..312c91fca535d34f648018032444a8bf21105583 100644 (file)
@@ -416,6 +416,7 @@ int pendconn_redistribute(struct server *s)
                p->strm_flags &= ~(SF_DIRECT | SF_ASSIGNED | SF_ADDR_SET);
 
                task_wakeup(p->strm->task, TASK_WOKEN_RES);
+               xferred++;
        }
        return xferred;
 }