]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: threads: Don't forget to init each thread toremove_lock.
authorOlivier Houchard <cognet@ci0.org>
Mon, 29 Jun 2020 15:48:27 +0000 (17:48 +0200)
committerOlivier Houchard <cognet@ci0.org>
Mon, 29 Jun 2020 15:50:29 +0000 (17:50 +0200)
Don't forget to use HA_SPIN_INIT() on each toremove_lock, or DEBUG_THREAD may
not work reliably with it.

This should be backported to 2.1 and 2.0.

src/cfgparse.c

index 4b0dc9e51aecafb09468e04837d7a4cc9ecf5724..e3f3d9fae6f9a6e75be0516230d553405b947745 100644 (file)
@@ -3571,6 +3571,7 @@ out_uri_auth_compat:
                                                        goto err;
                                                idle_conns[i].cleanup_task->process = srv_cleanup_toremove_connections;
                                                idle_conns[i].cleanup_task->context = NULL;
+                                               HA_SPIN_INIT(&idle_conns[i].toremove_lock);
                                                MT_LIST_INIT(&idle_conns[i].toremove_conns);
                                        }
                                }