MINOR: proxy: replace the pendconns-related stuff with a struct queue

All three elements (pendconns, nbpend, queue_idx) were moved to struct
queue.
This commit is contained in:
Willy Tarreau
2021-06-18 09:22:21 +02:00
parent eea3817a47
commit 7f3c1df248
9 changed files with 22 additions and 23 deletions

View File

@@ -87,7 +87,7 @@ static inline int server_has_room(const struct server *s) {
* for and if/else usage.
*/
static inline int may_dequeue_tasks(const struct server *s, const struct proxy *p) {
return (s && (s->nbpend || (p->nbpend && srv_currently_usable(s))) &&
return (s && (s->nbpend || (p->queue.length && srv_currently_usable(s))) &&
(!s->maxconn || s->cur_sess < srv_dynamic_maxconn(s)));
}