disables puting the entire worker in retry mode, cause
for forward workers the remote is not fixed.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105047
13f79535-47bb-0310-9956-
ffa450edef68
psf->req = flag;
psf->req_set = 1;
- /* Add default forward proxy worker */
- if ((err = ap_proxy_add_worker(&(psf->forward), parms->pool,
- psf, "*://*:0"))) {
- return apr_pstrcat(parms->temp_pool, "ProxyRequests ", err, NULL);
- }
-
+ if (flag) {
+ /* Add default forward proxy worker */
+ if ((err = ap_proxy_add_worker(&(psf->forward), parms->pool,
+ psf, "*://*:0"))) {
+ return apr_pstrcat(parms->temp_pool, "ProxyRequests ", err, NULL);
+ }
+ /* Do not disable worker in case of errors */
+ psf->forward->status = PROXY_WORKER_IGNORE_ERRORS;
+ }
return NULL;
}
/* woker status flags */
#define PROXY_WORKER_INITIALIZED 0x0001
+#define PROXY_WORKER_IGNORE_ERRORS 0x0002
#define PROXY_WORKER_IN_SHUTDOWN 0x0010
#define PROXY_WORKER_DISABLED 0x0020
#define PROXY_WORKER_IN_ERROR 0x0040
conn->sock = newsock;
connected = 1;
}
- /* Put the entire worker to error state
+ /* Put the entire worker to error state if
+ * the PROXY_WORKER_IGNORE_ERRORS flag is not set.
* Altrough some connections may be alive
* no further connections to the worker could be made
*/
- if (!connected && PROXY_WORKER_IS_USABLE(worker)) {
+ if (!connected && PROXY_WORKER_IS_USABLE(worker) &&
+ !(worker->status & PROXY_WORKER_IGNORE_ERRORS)) {
worker->status |= PROXY_WORKER_IN_ERROR;
worker->error_time = apr_time_now();
ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,