[master] 0205cdf Disable Nagle's algorithm on the backend as well
Federico G. Schwindt
fgsch at lodoss.net
Mon Dec 5 15:36:04 CET 2016
commit 0205cdf9e4b902d41df8197992da059bb41b3222
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