[core] restart dead proc on connect error if local

restart dead proc on connect error only if proc started by lighttpd
personal/stbuehler/tests-path
Glenn Strauss 2021-10-22 21:17:56 -04:00
parent 18ed51f06d
commit c22a56fe3b
1 changed files with 5 additions and 3 deletions

View File

@ -2117,9 +2117,11 @@ static handler_t gw_write_error(gw_handler_ctx * const hctx, request_st * const
/* (optimization to detect backend process exit while processing a
* large number of ready events; (this block could be removed)) */
server * const srv = r->con->srv;
if (0 == srv->srvconf.max_worker)
gw_restart_dead_procs(hctx->host, srv->errh, hctx->conf.debug, 0);
if (hctx->proc && hctx->proc->is_local) {
server * const srv = r->con->srv;
if (0 == srv->srvconf.max_worker)
gw_restart_dead_procs(hctx->host,srv->errh,hctx->conf.debug,0);
}
/* cleanup this request and let request handler start request again */
if (hctx->reconnects++ < 5) return gw_reconnect(hctx, r);