]> git.kaiwu.me - nginx.git/commitdiff
Upstream: posted requests handling after ssl handshake errors.
authorMaxim Dounin <mdounin@mdounin.ru>
Fri, 23 Aug 2013 18:18:46 +0000 (22:18 +0400)
committerMaxim Dounin <mdounin@mdounin.ru>
Fri, 23 Aug 2013 18:18:46 +0000 (22:18 +0400)
Missing call to ngx_http_run_posted_request() resulted in a main request hang
if subrequest's ssl handshake with an upstream server failed for some reason.

Reported by Aviram Cohen.

src/http/ngx_http_upstream.c

index 9e2830d07d50b8a7b4562bdb5330086f8e3b9461..652222f8fecea7f8174316a6652958f864df56a5 100644 (file)
@@ -1338,13 +1338,19 @@ ngx_http_upstream_ssl_handshake(ngx_connection_t *c)
         c->write->handler = ngx_http_upstream_handler;
         c->read->handler = ngx_http_upstream_handler;
 
+        c = r->connection;
+
         ngx_http_upstream_send_request(r, u);
 
+        ngx_http_run_posted_requests(c);
         return;
     }
 
+    c = r->connection;
+
     ngx_http_upstream_next(r, u, NGX_HTTP_UPSTREAM_FT_ERROR);
 
+    ngx_http_run_posted_requests(c);
 }
 
 #endif