mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-21 21:26:58 +00:00
Revert "MINOR: queue: update proxy->served once out of the loop"
This reverts commit 3e92a31783b545dd58c4be6c588808763e0042bc. The recent changes since 5304669e1 MEDIUM: queue: make pendconn_process_next_strm() only return the pendconn opened a tiny race condition between stream_free() and process_srv_queue(), as the pendconn is accessed outside of the lock, possibly while it's being freed. A different approach is required.
This commit is contained in:
parent
e76fc3253d
commit
d83c98eb14
@ -351,9 +351,10 @@ void process_srv_queue(struct server *s, int server_locked)
|
||||
if (!pc)
|
||||
break;
|
||||
|
||||
done++;
|
||||
done = 1;
|
||||
|
||||
_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);
|
||||
@ -362,8 +363,6 @@ void process_srv_queue(struct server *s, int server_locked)
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user