handle 'proxy not reachable'

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.3.x@488 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/heads/lighttpd-1.3.x
Jan Kneschke 18 years ago
parent 8f1558e1bb
commit 5da36ebd0f

@ -991,6 +991,23 @@ static handler_t proxy_handle_fdevent(void *s, void *ctx, int revents) {
log_error_write(srv, __FILE__, __LINE__, "sd",
"proxy: fdevent-hup", hctx->state);
}
if (hctx->state == PROXY_STATE_CONNECT) {
/* connect() -> EINPROGRESS -> HUP */
/**
* what is proxy is doing if it can't reach the next hop ?
*
*/
proxy_connection_close(srv, hctx);
joblist_append(srv, con);
con->http_status = 503;
con->mode = DIRECT;
return HANDLER_FINISHED;
}
con->file_finished = 1;

Loading…
Cancel
Save