From 1fe2c38ed058a505dccd584dc9eec195da8a6633 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 29 Nov 2016 19:47:29 +0100 Subject: MEDIUM: enable TCP_NODELAY For keep-alive we'll need to push responses as fast as possible and we won't be able to solely rely on the FIN to push packets out, so let's enable TCP_NODELAY. --- httpterm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/httpterm.c b/httpterm.c index 0cbdf6b..66532c2 100644 --- a/httpterm.c +++ b/httpterm.c @@ -2113,6 +2113,8 @@ int event_accept(int fd) { if (event_cli_read(cfd) < 0) FD_SET(cfd, StaticReadEvent); + setsockopt(cfd, SOL_TCP, TCP_NODELAY, (char *) &one, sizeof(one)); + fd_insert(cfd); tv_eternity(&s->cnexpire); -- 1.7.12.1