Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changes-entries/proxy-balancer-before-watchdog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*) mod_proxy_balancer: Set up the balancers in each child before the
watchdogs of mod_proxy_hcheck and mod_proxy_beacon use them.
[Jim Jagielski]
5 changes: 4 additions & 1 deletion modules/proxy/mod_proxy_balancer.c
Original file line number Diff line number Diff line change
Expand Up @@ -2056,12 +2056,15 @@ static void ap_proxy_balancer_register_hook(apr_pool_t *p)
*/
static const char *const aszPred[] = { "mpm_winnt.c", "mod_slotmem_shm.c", NULL};
static const char *const aszPred2[] = { "mod_proxy.c", NULL};
/* mod_watchdog's child_init starts threads that walk the balancers
* (mod_proxy_hcheck, mod_proxy_beacon): initialize them first. */
static const char *const aszSucc[] = { "mod_watchdog.c", NULL};
/* manager handler */
APR_REGISTER_OPTIONAL_FN(balancer_manage);
ap_hook_post_config(balancer_post_config, aszPred2, NULL, APR_HOOK_MIDDLE);
ap_hook_pre_config(balancer_pre_config, NULL, NULL, APR_HOOK_MIDDLE);
ap_hook_handler(balancer_handler, NULL, NULL, APR_HOOK_FIRST);
ap_hook_child_init(balancer_child_init, aszPred, NULL, APR_HOOK_MIDDLE);
ap_hook_child_init(balancer_child_init, aszPred, aszSucc, APR_HOOK_MIDDLE);
proxy_hook_pre_request(proxy_balancer_pre_request, NULL, NULL, APR_HOOK_FIRST);
proxy_hook_post_request(proxy_balancer_post_request, NULL, NULL, APR_HOOK_FIRST);
proxy_hook_canon_handler(proxy_balancer_canon, NULL, NULL, APR_HOOK_FIRST);
Expand Down
Loading