Skip to content

Commit c96ba2b

Browse files
authored
Merge pull request #295 from jajik/fix
Join two if branches with the same condition
2 parents f6cb55a + 40a8fe9 commit c96ba2b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

native/common/common.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -573,14 +573,13 @@ const char *get_route_balancer(request_rec *r, const proxy_server_conf *conf, co
573573
if (route && *route) {
574574
/* Nice we have a route, but make sure we have to serve it */
575575
int has_contexts = 0;
576+
const char *domain = NULL;
576577
node_context *nodes = find_node_context_host(r, balancer, route, use_alias, vhost_table, context_table,
577578
node_table, &has_contexts);
578579
if (nodes == NULL) {
579580
continue; /* we can't serve context/host for the request with this balancer */
580581
}
581-
}
582-
if (route && *route) {
583-
const char *domain = NULL;
582+
584583
ap_log_error(APLOG_MARK, APLOG_TRACE4, 0, r->server, "cluster: Found route %s", route);
585584
if (find_nodedomain(r, &domain, route, &balancer->s->name[BALANCER_PREFIX_LENGTH], node_table) ==
586585
APR_SUCCESS) {

0 commit comments

Comments
 (0)