mirror of
https://github.com/nginx/nginx.git
synced 2024-12-20 06:03:31 -06:00
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.
This commit is contained in:
parent
b384247262
commit
2f3fb935b4
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user