worker->name);
return;
}
- /* Get scoreboard slot */
- if (ap_scoreboard_image) {
- score = (proxy_worker_stat *) ap_get_scoreboard_lb(worker->id);
+ if (!worker->s) {
+ /* Get scoreboard slot */
+ if (ap_scoreboard_image) {
+ score = (proxy_worker_stat *) ap_get_scoreboard_lb(worker->id);
+ if (!score) {
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
+ "proxy: ap_get_scoreboard_lb(%d) failed in child %" APR_PID_T_FMT " for worker %s",
+ worker->id, getpid(), worker->name);
+ }
+ else {
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
+ "proxy: grabbed scoreboard slot %d in child %" APR_PID_T_FMT " for worker %s",
+ worker->id, getpid(), worker->name);
+ }
+ }
if (!score) {
- ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
- "proxy: ap_get_scoreboard_lb(%d) failed in child %" APR_PID_T_FMT " for worker %s",
- worker->id, getpid(), worker->name);
+ score = (proxy_worker_stat *) apr_pcalloc(conf->pool, sizeof(proxy_worker_stat));
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
+ "proxy: initialized plain memory in child %" APR_PID_T_FMT " for worker %s",
+ getpid(), worker->name);
}
- else {
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
- "proxy: grabbed scoreboard slot %d in child %" APR_PID_T_FMT " for worker %s",
- worker->id, getpid(), worker->name);
+ worker->s = score;
+ /*
+ * recheck to see if we've already been here. Possible
+ * if proxy is using scoreboard to hold shared stats
+ */
+ if (PROXY_WORKER_IS_INITIALIZED(worker)) {
+ /* The worker share is already initialized */
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
+ "proxy: worker %s already initialized",
+ worker->name);
+ return;
}
}
- if (!score) {
- score = (proxy_worker_stat *) apr_pcalloc(conf->pool, sizeof(proxy_worker_stat));
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
- "proxy: initialized plain memory in child %" APR_PID_T_FMT " for worker %s",
- getpid(), worker->name);
- }
- worker->s = score;
- /*
- * recheck to see if we've already been here. Possible
- * if proxy is using scoreboard to hold shared stats
- */
- if (PROXY_WORKER_IS_INITIALIZED(worker)) {
- /* The worker share is already initialized */
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
- "proxy: worker %s already initialized",
- worker->name);
- return;
- }
if (worker->route) {
strcpy(worker->s->route, worker->route);
}