commit e87675bff7ec5ed0b35d67baf27d139df1394597
parent b57845595eec72c6c83c0f71ab1a3dbb67b9da11
Author: ng0 <ng0@n0.is>
Date: Mon, 22 Jul 2019 17:43:19 +0000
cover the case of TCP_NOPUSH and TCP_CORK coexisting on the same OS.
Diffstat:
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c
@@ -381,14 +381,14 @@ MHD_send_on_connection2_ (struct MHD_Connection *connection,
TCP_CORK,
(const void *) &off_val,
sizeof (off_val)))
- ;
+ {
+ connection->sk_tcp_nodelay_on = true;
+ }
}
errno = eno;
}
return ret;
-#endif
-
-#if TCP_NOPUSH
+#elif TCP_NOPUSH
if (use_corknopush)
{
eno;
@@ -402,7 +402,9 @@ MHD_send_on_connection2_ (struct MHD_Connection *connection,
TCP_NOPUSH,
(const void *) &off_val,
sizeof (off_val)))
- ;
+ {
+ connection->sk_tcp_nodelay_on = false;
+ }
}
errno = eno;
}