diff --git a/src/backend.c b/src/backend.c index ebc5050cb..be081a5e1 100644 --- a/src/backend.c +++ b/src/backend.c @@ -1295,6 +1295,7 @@ int connect_server(struct stream *s) // see it possibly larger. ALREADY_CHECKED(i); + HA_SPIN_LOCK(OTHER_LOCK, &toremove_lock[tid]); tokill_conn = MT_LIST_POP(&srv->idle_orphan_conns[i], struct connection *, list); if (tokill_conn) { @@ -1305,6 +1306,7 @@ int connect_server(struct stream *s) task_wakeup(idle_conn_cleanup[i], TASK_WOKEN_OTHER); break; } + HA_SPIN_UNLOCK(OTHER_LOCK, &toremove_lock[tid]); } }