]> git.kaiwu.me - nginx.git/commit
Upstream: ngx_post_event() instead of upgraded call (ticket #503).
authorMaxim Dounin <mdounin@mdounin.ru>
Tue, 18 Feb 2014 13:30:40 +0000 (17:30 +0400)
committerMaxim Dounin <mdounin@mdounin.ru>
Tue, 18 Feb 2014 13:30:40 +0000 (17:30 +0400)
commit5ec277847e8ff5a0990c03b93794d2e5d581f8e3
tree47e79f6b6087d8dfa6b24e18def1e4c06ed9c722
parent1dc1b0785b89743d637fa18e6d78a4999e2cf54c
Upstream: ngx_post_event() instead of upgraded call (ticket #503).

If a request is finalized in the first call to the
ngx_http_upstream_process_upgraded() function, e.g., because upstream
server closed the connection for some reason, in the second call
the u->peer.connection pointer will be null, resulting in segmentation
fault.

Fix is to avoid second direct call, and post event instead.  This ensures
that ngx_http_upstream_process_upgraded() won't be called again if
a request is finalized.
src/http/ngx_http_upstream.c