diff options
author | Valentin Bartenev <vbart@nginx.com> | 2015-03-03 17:48:57 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2015-03-03 17:48:57 +0300 |
commit | 2f3fb935b454e7410d98717a33ab1da38d750e7e (patch) | |
tree | 318ec49377d5ad914bc4858db59b93030545cbd4 /src/http/modules/ngx_http_upstream_keepalive_module.c | |
parent | b38424726217cbdd00d3c71a535103023bef0c61 (diff) | |
download | nginx-2f3fb935b454e7410d98717a33ab1da38d750e7e.tar.gz nginx-2f3fb935b454e7410d98717a33ab1da38d750e7e.zip |
Upstream keepalive: drop ready flag on EAGAIN from recv(MSG_PEEK).
Keeping the ready flag in this case might results in missing notification of
broken connection until nginx tried to use it again.
While there, stale comment about stale event was removed since this function
is also can be called directly.
Diffstat (limited to 'src/http/modules/ngx_http_upstream_keepalive_module.c')
-rw-r--r-- | src/http/modules/ngx_http_upstream_keepalive_module.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/modules/ngx_http_upstream_keepalive_module.c b/src/http/modules/ngx_http_upstream_keepalive_module.c index f738f0cc1..4e005fc0e 100644 --- a/src/http/modules/ngx_http_upstream_keepalive_module.c +++ b/src/http/modules/ngx_http_upstream_keepalive_module.c @@ -387,7 +387,7 @@ ngx_http_upstream_keepalive_close_handler(ngx_event_t *ev) n = recv(c->fd, buf, 1, MSG_PEEK); if (n == -1 && ngx_socket_errno == NGX_EAGAIN) { - /* stale event */ + ev->ready = 0; if (ngx_handle_read_event(c->read, 0) != NGX_OK) { goto close; |