From: Yann Ylavic Date: Fri, 21 Jul 2023 14:54:51 +0000 (+0000) Subject: ab: Disable nagle algorithm on sockets, it's not telnet. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc71b51730aa6d5c370dd6f72ed6335b34d5c394;p=thirdparty%2Fapache%2Fhttpd.git ab: Disable nagle algorithm on sockets, it's not telnet. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1911176 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/support/ab.c b/support/ab.c index 4a2ef2ba424..571d2b06078 100644 --- a/support/ab.c +++ b/support/ab.c @@ -1655,6 +1655,12 @@ static void start_connection(struct connection * c) return; } + if ((rv = apr_socket_opt_set(c->aprsock, APR_TCP_NODELAY, 1))) { + graceful_strerror("socket nodelay", rv); + close_connection(c); + return; + } + if (windowsize != 0) { rv = apr_socket_opt_set(c->aprsock, APR_SO_SNDBUF, windowsize);