struct fe_counters *counters; /* statistics counters */
int nbconn; /* current number of connections on this listener */
- enum obj_type *default_target; /* default target to use for accepted sessions or NULL */
/* cache line boundary */
struct mt_list wait_queue; /* link element to make the listener wait for something (LI_LIMITED) */
unsigned int thr_idx; /* thread indexes for queue distribution : (t2<<16)+t1 */
* Newly allocated listener is at the end of the list
*/
l = LIST_ELEM(bind_conf->listeners.p, typeof(l), by_bind);
- l->default_target = curpeers->peers_fe->default_target;
l->options |= LI_O_UNLIMITED; /* don't make the peers subject to global limits */
global.maxsock++; /* for the listening socket */
* Newly allocated listener is at the end of the list
*/
l = LIST_ELEM(bind_conf->listeners.p, typeof(l), by_bind);
- l->default_target = curpeers->peers_fe->default_target;
l->options |= LI_O_UNLIMITED; /* don't make the peers subject to global limits */
global.maxsock++; /* for the listening socket */
}
}
#endif
- listener->default_target = curproxy->default_target;
-
if (!LIST_ISEMPTY(&curproxy->tcp_req.l4_rules))
listener->options |= LI_O_TCP_L4_RULES;
}
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 */
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 */
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 */
}
}
list_for_each_entry(l, &bind_conf->listeners, by_bind) {
- l->default_target = cfg_log_forward->default_target;
global.maxsock++;
}
cur_arg++;
}
stream_init_srv_conn(s);
- s->target = sess->listener ? sess->listener->default_target : NULL;
+ s->target = sess->fe->default_target;
s->pend_pos = NULL;
s->priority_class = 0;