From 7b3fe6d283f917bff99a60e2bdc59c98c82b1dfa Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Wed, 28 Jun 2023 16:03:30 +0200 Subject: [PATCH] Emulate corking when TCP_CORK is missing If we can't rely on the OS to handle corking for us, then we need to enable our own handling of it. --- common/rdr/FdOutStream.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/common/rdr/FdOutStream.cxx b/common/rdr/FdOutStream.cxx index e630a4d7..68677726 100644 --- a/common/rdr/FdOutStream.cxx +++ b/common/rdr/FdOutStream.cxx @@ -52,7 +52,12 @@ using namespace rdr; FdOutStream::FdOutStream(int fd_) - : BufferedOutStream(false), fd(fd_) +#ifdef TCP_CORK + : BufferedOutStream(false), +#else + : BufferedOutStream(true), +#endif + fd(fd_) { gettimeofday(&lastWrite, NULL); } -- 2.39.5