]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: do not decrement jobs for backend conns
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 19 Nov 2025 10:40:40 +0000 (11:40 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 19 Nov 2025 15:02:22 +0000 (16:02 +0100)
jobs is a global counter which serves to account activity through the
whole process. Soft-stop procedure will wait until this counter is
resetted to the nul value.

jobs is not used for backend connections. Thus, it is not incremented
when a QUIC backend connection is instantiated as expected. However,
decrement is performed on all sides during quic_conn_release(). This
causes the counter wrapping.

Fix this by decrementing jobs only for frontend connections. Without
this patch, soft stop procedure will hang indefinitely if QUIC backend
connections were in use.

src/quic_conn.c

index 12532594abc222a83bb353878696072d5efcc9fb..2a82484d7e541ecabec316d61b15b504d325dbfe 100644 (file)
@@ -1554,7 +1554,7 @@ int quic_conn_release(struct quic_conn *qc)
                ret = 1;
        }
 
-       if (qc_test_fd(qc))
+       if (!qc_is_back(qc) && qc_test_fd(qc))
                _HA_ATOMIC_DEC(&jobs);
 
        /* Close quic-conn socket fd. */