1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-13 03:03:15 +00:00
freebsd-ports/www/lighttpd/files/extra-patch-nodelay
Martin Matuska 00d62cdc46 - Add optional TCP_NODELAY patch
PR:		ports/145985
Approved by:	maintainer (timeout)
2010-05-21 07:49:36 +00:00

16 lines
619 B
Plaintext

--- src/network.c.orig Tue Jan 26 14:33:01 2010
+++ src/network.c Tue Jan 26 14:37:39 2010
@@ -226,6 +226,12 @@
log_error_write(srv, __FILE__, __LINE__, "ss", "socketsockopt failed:", strerror(errno));
goto error_free_socket;
}
+ if(srv_socket->addr.plain.sa_family == AF_INET || srv_socket->addr.plain.sa_family == AF_INET6 ) {
+ if (setsockopt(srv_socket->fd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof(val)) < 0) {
+ log_error_write(srv, __FILE__, __LINE__, "ss", "socketsockopt failed:", strerror(errno));
+ goto error_free_socket;
+ }
+ }
switch(srv_socket->addr.plain.sa_family) {
#ifdef HAVE_IPV6