Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] making ngx_http_upstream_test_connect catch "connection refused" with kqueue

agentzh
November 06, 2012 02:24PM
Hello!

On Tue, Nov 6, 2012 at 9:55 AM, Maxim Dounin wrote:
>
> I don't see a reason to introduce another local variable here,
> what about something like
>
> --- a/src/http/ngx_http_upstream.c
> +++ b/src/http/ngx_http_upstream.c
> @@ -1809,9 +1809,16 @@ ngx_http_upstream_test_connect(ngx_conne
> #if (NGX_HAVE_KQUEUE)
>
> if (ngx_event_flags & NGX_USE_KQUEUE_EVENT) {
> - if (c->write->pending_eof) {
> + if (c->write->pending_eof || c->read->pending_eof) {
> + if (c->write->pending_eof) {
> + err = c->write->kq_errno;
> +
> + } else {
> + err = c->read->kq_errno;
> + }
> +
> c->log->action = "connecting to upstream";
> - (void) ngx_connection_error(c, c->write->kq_errno,
> + (void) ngx_connection_error(c, err,
> "kevent() reported that connect() failed");
> return NGX_ERROR;
> }
>
> instead?
>

I'm fine with this new patch :)

Best regards,
-agentzh

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] making ngx_http_upstream_test_connect catch "connection refused" with kqueue Attachments

agentzh 1332 November 06, 2012 01:20AM

Re: [PATCH] making ngx_http_upstream_test_connect catch "connection refused" with kqueue

Ruslan Ermilov 503 November 06, 2012 12:08PM

Re: [PATCH] making ngx_http_upstream_test_connect catch "connection refused" with kqueue

Maxim Dounin 672 November 06, 2012 12:56PM

Re: [PATCH] making ngx_http_upstream_test_connect catch "connection refused" with kqueue

agentzh 371 November 06, 2012 02:24PM

Re: [PATCH] making ngx_http_upstream_test_connect catch "connection refused" with kqueue

Maxim Dounin 639 November 16, 2012 01:30PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 164
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready