Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

may be a debug in ngx_tcp_upstream_check_broken_connection? #74

Open
chenbk85 opened this Issue Apr 17, 2013 · 0 comments

Comments

Projects
None yet
1 participant

hi~
there may be a bug in the function ngx_tcp_upstream_check_broken_connection in the file named ngx_tcp_upstream.c,

ngx_int_t
ngx_tcp_upstream_check_broken_connection(ngx_tcp_session_t *s)
{
... ...
n = recv(c->fd, buf, 1, MSG_PEEK);
err = ngx_socket_errno;
ngx_log_debug1(NGX_LOG_DEBUG_TCP, c->log, err,
"tcp check upstream recv(): %d", n);
//! debug? when recv return 0, the connection is shut down, and then should set c->error to 1?
if (n >= 0 || err == NGX_EAGAIN) {
return NGX_OK;
}
... ...
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment