diff --git a/src/haterm.c b/src/haterm.c index 2aefd0af1..d51d1bf46 100644 --- a/src/haterm.c +++ b/src/haterm.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include @@ -1223,11 +1223,22 @@ static int hstream_build_responses(void) #if defined(USE_LINUX_SPLICE) static void hstream_init_splicing(void) { + struct proxy *px; unsigned int pipesize = 65536; + int haterm_used = 0; if (!(global.tune.options & GTUNE_USE_SPLICE) || !global.maxpipes) return; + for (px = proxies_list; px; px = px->next) { + if ((px->cap & PR_CAP_FE) && !(px->flags & PR_FL_DISABLED) && px->stream_new_from_sc == hstream_new) { + haterm_used = 1; + break; + } + } + if (!haterm_used) + return; + if (global.tune.pipesize) pipesize = global.tune.pipesize;