Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear worker status when reused, fix find_node_context_host condition #851

Merged
merged 1 commit into from
Dec 6, 2024
Merged
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: 2 additions & 1 deletion native/mod_proxy_cluster/mod_proxy_cluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ static apr_status_t create_worker(proxy_server_conf *conf, proxy_balancer *balan
worker->s->is_address_reusable = 1;
worker->s->acquire = apr_time_make(0, 2 * 1000); /* 2 ms */
worker->s->retry = apr_time_from_sec(PROXY_WORKER_DEFAULT_RETRY);
worker->s->status = 0;
}

if (created && worker->s->upgrade[0] != '\0') {
Expand Down Expand Up @@ -1828,7 +1829,7 @@ static node_context *find_node_context_host(request_rec *r, proxy_balancer *bala
nodeinfo_t *node = table_get_node(node_table, context->node);
if (node == NULL)
continue;
if (strlen(balancer->s->name) > 11 && strcasecmp(&balancer->s->name[11], node->mess.balancer) != 0)
if (strlen(balancer->s->name) <= 11 || strcasecmp(&balancer->s->name[11], node->mess.balancer) != 0)
continue;
}
*has_contexts = -1;
Expand Down
Loading