MINOR: queue: update proxy->served once out of the loop
It's not needed during all these operations and doesn't even affect
queueing in the LB algo, so we can safely update it out of the loop
and the lock.
diff --git a/src/queue.c b/src/queue.c
index fe082de..87ffca5 100644
--- a/src/queue.c
+++ b/src/queue.c
@@ -351,10 +351,9 @@
if (!pc)
break;
- done = 1;
+ done++;
_HA_ATOMIC_INC(&s->served);
- _HA_ATOMIC_INC(&p->served);
stream_add_srv_conn(pc->strm, s);
task_wakeup(pc->strm->task, TASK_WOKEN_RES);
@@ -363,6 +362,8 @@
if (!server_locked)
HA_SPIN_UNLOCK(SERVER_LOCK, &s->lock);
+ _HA_ATOMIC_ADD(&p->served, done);
+
if (done && p->lbprm.server_take_conn)
p->lbprm.server_take_conn(s, server_locked);
}