From: Maxim Dounin Date: Wed, 27 Mar 2013 15:16:45 +0000 (+0000) Subject: Event connect: don't penalize AF_INET6 connections. X-Git-Tag: release-1.3.16~18 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=3b9e7adcf44d3970944913fb1e3f0b4f3979f3a9;p=nginx.git 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. --- diff --git a/src/event/ngx_event_connect.c b/src/event/ngx_event_connect.c index 978f39b42..e6ae6564e 100644 --- a/src/event/ngx_event_connect.c +++ b/src/event/ngx_event_connect.c @@ -84,7 +84,7 @@ ngx_event_connect_peer(ngx_peer_connection_t *pc) 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;