mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 14:21:25 +02:00
BUG/MEDIUM: threads/peers: decrement, not increment jobs on quitting
Commit 8d8aa0d ("MEDIUM: threads/listeners: Make listeners thread-safe") mistakenly placed HA_ATOMIC_ADD(job, 1) to replace a job--, so it maintains the job count too high preventing the process from cleanly exiting on reload. This needs to be backported to 1.8.
This commit is contained in:
parent
cebd7962e2
commit
cea8537efd
@ -2102,7 +2102,7 @@ static struct task *process_peer_sync(struct task * task)
|
||||
if (ps->flags & PEER_F_TEACH_COMPLETE) {
|
||||
if (peers->flags & PEERS_F_DONOTSTOP) {
|
||||
/* resync of new process was complete, current process can die now */
|
||||
HA_ATOMIC_ADD(&jobs, 1);
|
||||
HA_ATOMIC_SUB(&jobs, 1);
|
||||
peers->flags &= ~PEERS_F_DONOTSTOP;
|
||||
for (st = ps->tables; st ; st = st->next)
|
||||
st->table->syncing--;
|
||||
|
Loading…
x
Reference in New Issue
Block a user