nginx_tcp_proxy_module icon indicating copy to clipboard operation
nginx_tcp_proxy_module copied to clipboard

may be a debug in ngx_tcp_upstream_check_broken_connection?

Open chenbk85 opened this issue 12 years ago • 0 comments

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; } ... ... }

chenbk85 avatar Apr 17 '13 04:04 chenbk85