]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: cli: dequeue from the proxy when changing a maxconn
authorWilly Tarreau <w@1wt.eu>
Thu, 24 Nov 2016 14:25:39 +0000 (15:25 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 24 Nov 2016 14:34:34 +0000 (15:34 +0100)
The "set maxconn frontend" statement on the CLI tries to dequeue possibly
pending requests, but due to a copy-paste error, they're dequeued on the
CLI's frontend instead of the one being changed.

The impact is very minor as it only means that possibly pending connections
will still have to wait for a previous one to complete before being accepted
when a limit is raised.

This fix has to be backported to 1.6 and 1.5.

src/dumpstats.c

index e22d0744c46153db03c40f94f2a22f11f7b5f48d..fe1ad48dcb734f8274aff1b983d909ff7c0f6220 100644 (file)
@@ -1890,8 +1890,8 @@ static int stats_sock_parse_request(struct stream_interface *si, char *line)
                                                resume_listener(l);
                                }
 
-                               if (px->maxconn > px->feconn && !LIST_ISEMPTY(&strm_fe(s)->listener_queue))
-                                       dequeue_all_listeners(&strm_fe(s)->listener_queue);
+                               if (px->maxconn > px->feconn && !LIST_ISEMPTY(&px->listener_queue))
+                                       dequeue_all_listeners(&px->listener_queue);
 
                                return 1;
                        }