Welcome! Log In Create A New Profile

Advanced

[nginx] Upstream: fixed broken connection check with eventport.

Maxim Dounin
March 28, 2021 10:48AM
details: https://hg.nginx.org/nginx/rev/1bf8ab7063de
branches:
changeset: 7810:1bf8ab7063de
user: Maxim Dounin <mdounin@mdounin.ru>
date: Sun Mar 28 17:45:37 2021 +0300
description:
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.

diffstat:

src/http/ngx_http_upstream.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r b1302f1dd2f6 -r 1bf8ab7063de src/http/ngx_http_upstream.c
--- a/src/http/ngx_http_upstream.c Sun Mar 28 17:45:35 2021 +0300
+++ b/src/http/ngx_http_upstream.c Sun Mar 28 17:45:37 2021 +0300
@@ -607,6 +607,12 @@ ngx_http_upstream_init_request(ngx_http_
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;
}
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Upstream: fixed broken connection check with eventport.

Maxim Dounin 265 March 28, 2021 10:48AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 293
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready