Skip to content

Commit 5a1be88

Browse files
author
mdounin
committed
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.
1 parent b2c06cf commit 5a1be88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/event/ngx_event_connect.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ ngx_event_connect_peer(ngx_peer_connection_t *pc)
8484

8585
c->log_error = pc->log_error;
8686

87-
if (pc->sockaddr->sa_family != AF_INET) {
87+
if (pc->sockaddr->sa_family == AF_UNIX) {
8888
c->tcp_nopush = NGX_TCP_NOPUSH_DISABLED;
8989
c->tcp_nodelay = NGX_TCP_NODELAY_DISABLED;
9090

0 commit comments

Comments
 (0)