Skip to content

Commit

Permalink
Remove two unnecessary asserts, add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jajik committed Oct 24, 2023
1 parent cba3a0e commit 29bdb85
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions native/mod_proxy_cluster/mod_proxy_cluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,7 @@ static apr_status_t create_worker_reuse(proxy_server_conf *conf, const char *ptr
helper = *helper_ptr;
if (helper->index == -1) {
/* We are going to reuse a removed one */
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, server, "Created: reusing removed worker for %s", url);
ap_assert(0);
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, server, "create_worker_reuse: reusing removed worker for %s", url);
return APR_SUCCESS;
}

Expand Down Expand Up @@ -1287,8 +1286,10 @@ static int internal_update_lbstatus(proxy_server_conf *conf, apr_pool_t *pool, s
strcmp(sport, ou->mess.Port)) {
node_storage->unlock_nodes();
/* the worker doesn't correspond to the node something is very broken */
ap_assert(0);
return 1; /* won't reach this one... */
ap_log_error(APLOG_MARK, APLOG_CRIT, 0, server,
"update_workers_lbstatus worker: (%s) does not correspond to the node (%s)", worker->s->hostname,
ou->mess.Host);
return 1;
}

/* Here we should decide about using hcheck result or a request that pings the node */
Expand Down

0 comments on commit 29bdb85

Please sign in to comment.