]> git.kaiwu.me - haproxy.git/commitdiff
MEDIUM: streams: Remove unnecessary call to srv_manage_queues()
authorOlivier Houchard <ohouchard@haproxy.com>
Fri, 6 Feb 2026 08:29:14 +0000 (09:29 +0100)
committerOlivier Houchard <cognet@ci0.org>
Mon, 2 Mar 2026 12:46:17 +0000 (13:46 +0100)
Remove the call to srv_manage_queues() at the beginning of strem_free().
It is not needed. Before cur_sess was removed, it was bogusly using it
to check if the server was full, but process_srv_queue() was using
served anyway, so cur_sess was not reliable. At this point, served has
already be decremented, and process_srv_queue() was called, or it will
be later in stream_free(), but there is no point in doing that at the
beginning of steam_free().

src/stream.c

index fff7574794804ad83f4567abf90ba65fcfdfa2f1..6f566794a431646958b01c853d4f888f9f19462e 100644 (file)
@@ -629,10 +629,6 @@ void stream_free(struct stream *s)
 
        pendconn_free(s);
 
-       if (objt_server(s->target)) { /* there may be requests left pending in queue */
-               srv_manage_queues(__objt_server(s->target), s->be);
-       }
-
        if (unlikely(s->srv_conn)) {
                struct server *oldsrv = s->srv_conn;
                /* the stream still has a reserved slot on a server, but