From 4bc408168dd163218eabca11fed138bcb003c381 Mon Sep 17 00:00:00 2001 From: "Evgeny Grin (Karlson2k)" Date: Sat, 5 Dec 2020 17:45:34 +0300 Subject: [PATCH] mhd_socket.c: fixed: unneeded zero-send on *BSD No need for zero-send on *BSD/Darwin if cork is set --- src/microhttpd/mhd_sockets.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/microhttpd/mhd_sockets.c b/src/microhttpd/mhd_sockets.c index c5c6f90d..a00330a3 100644 --- a/src/microhttpd/mhd_sockets.c +++ b/src/microhttpd/mhd_sockets.c @@ -520,6 +520,7 @@ MHD_socket_cork_ (MHD_socket sock, /* FreeBSD do not need zero-send for flushing starting from version 9 */ return 1; #elif defined(TCP_NOPUSH) && ! defined(TCP_CORK) + if (! on) { const int dummy = 0; /* Force flush data with zero send otherwise Darwin and some BSD systems