summaryrefslogtreecommitdiff
path: root/src/connections.c
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2021-11-03 11:48:14 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2021-11-03 11:48:14 -0400
commit9cdb812c96f532cf20b7e36dadefe2ab0016ebe5 (patch)
treec8c1e4d5904f9de26e69b748dec2bcea23e2f66e /src/connections.c
parentb376934b6799fe8cee809f70292c9ee832c31ccf (diff)
downloadlighttpd-git-9cdb812c96f532cf20b7e36dadefe2ab0016ebe5.tar.gz
[core] use TCP_CORK w/ TLS if cq length > 16k
use TCP_CORK (on Linux) with TLS if cq length > 16k
Diffstat (limited to 'src/connections.c')
-rw-r--r--src/connections.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/connections.c b/src/connections.c
index c655f388..411a389c 100644
--- a/src/connections.c
+++ b/src/connections.c
@@ -290,7 +290,7 @@ connection_write_chunkqueue (connection * const con, chunkqueue * const restrict
/* Linux: put a cork into socket as we want to combine write() calls
* but only if we really have multiple chunks including non-MEM_CHUNK
* (or if multiple chunks and TLS), and only if TCP socket */
- if (NULL != c || con->is_ssl_sock) {
+ if (NULL != c || (max_bytes > 16384 && con->is_ssl_sock)) {
const int sa_family = sock_addr_get_family(&con->srv_socket->addr);
if (sa_family == AF_INET || sa_family == AF_INET6) {
corked = 1;