comparison src/event/ngx_event_connect.c @ 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 fbae1a82de8b
children 3d2d3e1cf427
comparison
equal deleted inserted replaced
5140:3df40966f8b8 5141:87faa6b818bc
82 82
83 c->sendfile = 1; 83 c->sendfile = 1;
84 84
85 c->log_error = pc->log_error; 85 c->log_error = pc->log_error;
86 86
87 if (pc->sockaddr->sa_family != AF_INET) { 87 if (pc->sockaddr->sa_family == AF_UNIX) {
88 c->tcp_nopush = NGX_TCP_NOPUSH_DISABLED; 88 c->tcp_nopush = NGX_TCP_NOPUSH_DISABLED;
89 c->tcp_nodelay = NGX_TCP_NODELAY_DISABLED; 89 c->tcp_nodelay = NGX_TCP_NODELAY_DISABLED;
90 90
91 #if (NGX_SOLARIS) 91 #if (NGX_SOLARIS)
92 /* Solaris's sendfilev() supports AF_NCA, AF_INET, and AF_INET6 */ 92 /* Solaris's sendfilev() supports AF_NCA, AF_INET, and AF_INET6 */