Welcome! Log In Create A New Profile

Advanced

[nginx] svn commit: r4916 - trunk/src/http

Anonymous User
November 16, 2012 01:30PM
Author: mdounin
Date: 2012-11-16 18:29:19 +0000 (Fri, 16 Nov 2012)
New Revision: 4916
URL: http://trac.nginx.org/nginx/changeset/4916/nginx

Log:
Upstream: better detection of connect() failures with kqueue.

Pending EOF might be reported on both read and write events, whichever
comes first, so check both of them.

Patch by Yichun Zhang (agentzh), slightly modified.


Modified:
trunk/src/http/ngx_http_upstream.c

Modified: trunk/src/http/ngx_http_upstream.c
===================================================================
--- trunk/src/http/ngx_http_upstream.c 2012-11-16 12:18:05 UTC (rev 4915)
+++ trunk/src/http/ngx_http_upstream.c 2012-11-16 18:29:19 UTC (rev 4916)
@@ -1809,9 +1809,16 @@
#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;
}

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

[nginx] svn commit: r4916 - trunk/src/http

Anonymous User 819 November 16, 2012 01:30PM



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

Online Users

Guests: 232
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