From caa964acc798a04ee9d9c2bcef9600250d0fd038 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 2 Jan 2014 18:16:05 +0100 Subject: MEDIUM: use MSG_MORE on send() It was only set on splice() unfortunately. --- httpterm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/httpterm.c b/httpterm.c index 2c22224..c4436c2 100644 --- a/httpterm.c +++ b/httpterm.c @@ -92,6 +92,10 @@ #define SHUT_WR 1 #endif +#ifndef MSG_MORE +#define MSG_MORE 0 +#endif + /* We'll try to enable SO_REUSEPORT on Linux 2.4 and 2.6 if not defined. * There are two families of values depending on the architecture. Those * are at least valid on Linux 2.4 and 2.6, reason why we'll rely on the @@ -1773,7 +1777,7 @@ int event_cli_write(int fd) { } #endif if (max && ret) - ret = send(fd, data_ptr, max, MSG_DONTWAIT | MSG_NOSIGNAL); + ret = send(fd, data_ptr, max, MSG_DONTWAIT | MSG_NOSIGNAL | MSG_MORE); #endif if (ret > 0) { -- 1.7.12.1