changeset 5141:87faa6b818bc

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.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 27 Mar 2013 15:16:45 +0000
parents 3df40966f8b8
children afea5259e05c
files src/event/ngx_event_connect.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/event/ngx_event_connect.c
+++ b/src/event/ngx_event_connect.c
@@ -84,7 +84,7 @@ ngx_event_connect_peer(ngx_peer_connecti
 
     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;