MINOR: listener: remove the useless ->default_target field
This field is used by stream_new() to optionally set the applet the
stream will connect to for simple proxies like the CLI for example.
But it has never been configurable to anything and is always strictly
equal to the frontend's ->default_target. Let's just drop it and make
stream_new() only use the frontend's. It makes more sense anyway as
we don't want the proxy to work differently based on the "bind" line.
This idea was brought in 1.6 hoping that the h2 implementation would
use applets for decoding (which was dropped after the very first
attempt in 1.8).
diff --git a/src/cli.c b/src/cli.c
index c917ea2..4b78fda 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -552,8 +552,8 @@
}
bind_conf->accept = session_accept_fd;
+
list_for_each_entry(l, &bind_conf->listeners, by_bind) {
- l->default_target = global.cli_fe->default_target;
l->options |= LI_O_UNLIMITED; /* don't make the peers subject to global limits */
l->nice = -64; /* we want to boost priority for local stats */
global.maxsock++; /* for the listening socket */
@@ -3045,8 +3045,8 @@
bind_conf->accept = session_accept_fd;
+
list_for_each_entry(l, &bind_conf->listeners, by_bind) {
- l->default_target = mworker_proxy->default_target;
/* don't make the peers subject to global limits and don't close it in the master */
l->options |= LI_O_UNLIMITED;
l->rx.flags |= RX_F_MWORKER; /* we are keeping this FD in the master */
@@ -3112,8 +3112,8 @@
ha_free(&path);
bind_conf->accept = session_accept_fd;
+
list_for_each_entry(l, &bind_conf->listeners, by_bind) {
- l->default_target = global.cli_fe->default_target;
l->options |= (LI_O_UNLIMITED | LI_O_NOSTOP);
HA_ATOMIC_INC(&unstoppable_jobs);
/* it's a sockpair but we don't want to keep the fd in the master */