nginx_tcp_proxy_module
nginx_tcp_proxy_module copied to clipboard
may be a debug in ngx_tcp_upstream_check_broken_connection?
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; } ... ... }