--- httpd-2.4.25/modules/proxy/mod_proxy_hcheck.c 2017-03-31 16:37:20.931619893 +0200 +++ httpd-2.4.25_patched/modules/proxy/mod_proxy_hcheck.c 2017-03-31 16:35:11.725088283 +0200 @@ -104,6 +104,7 @@ void *v) { int ival; + apr_interval_time_t timeout; hc_template_t *temp; sctx_t *ctx = (sctx_t *) ap_get_module_config(s->module_config, &proxy_hcheck_module); @@ -165,6 +166,17 @@ temp->interval = apr_time_from_sec(ival); } } + else if (!strcasecmp(key, "hcconnectiontimeout")) { + /* Request timeout in given unit (default is second). + * Defaults to connection timeout + */ + if (ap_timeout_parameter_parse(val, &timeout, "s") != APR_SUCCESS) + return "Connectiontimeout has wrong format"; + if (timeout < 1000) + return "Connectiontimeout must be at least one millisecond."; + worker->s->conn_timeout = timeout; + worker->s->conn_timeout_set = 1; + } else if (!strcasecmp(key, "hcpasses")) { ival = atoi(val); if (ival < 0) @@ -473,6 +485,8 @@ ap_proxy_initialize_worker(hc, ctx->s, ctx->p); hc->s->is_address_reusable = worker->s->is_address_reusable; hc->s->disablereuse = worker->s->disablereuse; + hc->s->conn_timeout = worker->s->conn_timeout; + hc->s->conn_timeout_set = 1; hc->s->method = worker->s->method; rv = apr_uri_parse(p, url, &uri); if (rv == APR_SUCCESS) {