Mercurial > hg > nginx-quic
changeset 5999:4d8936b1fc32
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.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Tue, 03 Mar 2015 17:48:57 +0300 |
parents | ea58dfd07782 |
children | 93fee708f168 |
files | src/http/modules/ngx_http_upstream_keepalive_module.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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_handle 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;