mirror of
https://github.com/nginx/nginx.git
synced 2026-04-26 00:27:25 -04:00
Fixup: request cannot be cleanup sometimes.
When nginx tries to write to a broken connection. It triggers an IO error, and then mark the connection as error. If ngx_http_finalize_connection is invoked after the IO error, Current code will setup an handler to r->write_event_handler. That will be a trouble, the newly installed handler will never be called, and the request will be leaked.
This commit is contained in:
parent
57d54fd922
commit
1fc3c1814e
1 changed files with 1 additions and 1 deletions
|
|
@ -2715,7 +2715,7 @@ ngx_http_terminate_request(ngx_http_request_t *r, ngx_int_t rc)
|
|||
"http terminate cleanup count:%d blk:%d",
|
||||
mr->count, mr->blocked);
|
||||
|
||||
if (mr->write_event_handler) {
|
||||
if (!mr->connection->error && mr->write_event_handler) {
|
||||
|
||||
if (mr->blocked) {
|
||||
r = r->connection->data;
|
||||
|
|
|
|||
Loading…
Reference in a new issue