Mercurial > hg > nginx
changeset 5827:54e9b83d00f0
Upstream: avoided directly terminating the connection.
When memory allocation failed in ngx_http_upstream_cache(), the connection
would be terminated directly in ngx_http_upstream_init_request().
Return a INTERNAL_SERVER_ERROR response instead.
author | FengGu <flygoast@126.com> |
---|---|
date | Wed, 13 Aug 2014 14:53:55 +0800 |
parents | 16013b71feed |
children | 733952da0a8a |
files | src/http/ngx_http_upstream.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c Mon Sep 08 21:36:09 2014 +0400 +++ b/src/http/ngx_http_upstream.c Wed Aug 13 14:53:55 2014 +0800 @@ -519,6 +519,11 @@ return; } + if (rc == NGX_ERROR) { + ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); + return; + } + if (rc != NGX_DECLINED) { ngx_http_finalize_request(r, rc); return;