[4.1] 72435ed Disable Nagle's algorithm on the backend as well
PÃ¥l Hermunn Johansen
hermunn at varnish-software.com
Thu Dec 8 10:25:05 CET 2016
commit 72435ed0e9aa6c0e46f88e95f37af1ceb9e0bba0
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Sat Nov 19 23:29:22 2016 +0000
Disable Nagle's algorithm on the backend as well
Fixes #2134.
diff --git a/lib/libvarnish/vtcp.c b/lib/libvarnish/vtcp.c
index 83e33b4..62a9fb6 100644
--- a/lib/libvarnish/vtcp.c
+++ b/lib/libvarnish/vtcp.c
@@ -279,6 +279,7 @@ VTCP_connect(const struct suckaddr *name, int msec)
struct pollfd fds[1];
const struct sockaddr *sa;
socklen_t sl;
+ int val;
if (name == NULL)
return (-1);
@@ -296,6 +297,9 @@ VTCP_connect(const struct suckaddr *name, int msec)
if (msec != 0)
(void)VTCP_nonblocking(s);
+ val = 1;
+ AZ(setsockopt(s, IPPROTO_TCP, TCP_NODELAY, &val, sizeof val));
+
i = connect(s, sa, sl);
if (i == 0)
return (s);
More information about the varnish-commit
mailing list