[nginx] svn commit: r5142 - trunk/src/event

mdounin at mdounin.ru mdounin at mdounin.ru
Wed Mar 27 15:16:46 UTC 2013


Author: mdounin
Date: 2013-03-27 15:16:45 +0000 (Wed, 27 Mar 2013)
New Revision: 5142
URL: http://trac.nginx.org/nginx/changeset/5142/nginx

Log:
Event connect: don't penalize AF_INET6 connections.

Problems with setsockopt(TCP_NODELAY) and setsockopt(TCP_NOPUSH), as well
as sendfile() syscall on Solaris, are specific to UNIX-domain sockets.
Other address families, i.e. AF_INET and AF_INET6, are fine.


Modified:
   trunk/src/event/ngx_event_connect.c

Modified: trunk/src/event/ngx_event_connect.c
===================================================================
--- trunk/src/event/ngx_event_connect.c	2013-03-27 15:15:34 UTC (rev 5141)
+++ trunk/src/event/ngx_event_connect.c	2013-03-27 15:16:45 UTC (rev 5142)
@@ -84,7 +84,7 @@
 
     c->log_error = pc->log_error;
 
-    if (pc->sockaddr->sa_family != AF_INET) {
+    if (pc->sockaddr->sa_family == AF_UNIX) {
         c->tcp_nopush = NGX_TCP_NOPUSH_DISABLED;
         c->tcp_nodelay = NGX_TCP_NODELAY_DISABLED;
 



More information about the nginx-devel mailing list