Upstream: fixed broken connection check with eventport.

For connection close to be reported with eventport on Solaris,
ngx_handle_read_event() needs to be called.
This commit is contained in:
Maxim Dounin 2021-03-28 17:45:37 +03:00
parent 9104757a7d
commit 8885c45e1e

View File

@ -607,6 +607,12 @@ ngx_http_upstream_init_request(ngx_http_request_t *r)
u->store = u->conf->store;
if (!u->store && !r->post_action && !u->conf->ignore_client_abort) {
if (ngx_handle_read_event(r->connection->read, 0) != NGX_OK) {
ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
return;
}
r->read_event_handler = ngx_http_upstream_rd_check_broken_connection;
r->write_event_handler = ngx_http_upstream_wr_check_broken_connection;
}