For rHTTP servers, check-reuse-pool is forcefully set on them, else
checks would always fail. This initialization was performed in
_srv_parse_init().
Move this force init in srv_settings_init(). This is a better place as
_srv_parse_init() should only perform minimal configuration, mostly
related to server address. Then srv_settings_init() is called with the
task to set every fields to suitable default values before keywords
parsing.
Also, this ensures that check-reuse-pool is set to 0 for non rHTTP
servers. This is not strictly required though as server structure is
calloc'ed.
srv->check.rise = DEF_RISETIME;
srv->check.fall = DEF_FALLTIME;
srv->check.port = 0;
+ /* Automatically activate check-reuse-pool for rhttp@ servers. */
+ srv->check.reuse_pool = srv->flags & SRV_F_RHTTP ? 1 : 0;
srv->agent.inter = DEF_CHKINTR;
srv->agent.fastinter = 0;
}
else {
newsrv->flags |= SRV_F_RHTTP;
- /* Automatically activate check-reuse-pool for rhttp@ servers. */
- newsrv->check.reuse_pool = 1;
}
}