diff --git a/src/backend.c b/src/backend.c index b2f924c27..c8bb33e81 100644 --- a/src/backend.c +++ b/src/backend.c @@ -681,7 +681,7 @@ int assign_server(struct stream *s) /* if there's some queue on the backend, with certain algos we * know it's because all servers are full. */ - if (s->be->queue.length && s->be->queue.length != s->be->beconn && + if (s->be->queue.length && s->be->served && s->be->queue.length != s->be->beconn && (((s->be->lbprm.algo & (BE_LB_KIND|BE_LB_NEED|BE_LB_PARM)) == BE_LB_ALGO_FAS)|| // first ((s->be->lbprm.algo & (BE_LB_KIND|BE_LB_NEED|BE_LB_PARM)) == BE_LB_ALGO_RR) || // roundrobin ((s->be->lbprm.algo & (BE_LB_KIND|BE_LB_NEED|BE_LB_PARM)) == BE_LB_ALGO_SRR))) { // static-rr