aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/microhttpd/connection.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 719ba7b6..4b8b7a4a 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -489,22 +489,11 @@ sendfile_adapter (struct MHD_Connection *connection)
489 * No other system in 2019-06 has TCP_CORK. */ 489 * No other system in 2019-06 has TCP_CORK. */
490 if ((! using_tls) && (use_corknopush) && (have_cork && ! want_cork)) 490 if ((! using_tls) && (use_corknopush) && (have_cork && ! want_cork))
491 { 491 {
492 if (0 == setsockopt (connection->socket_fd, 492 MHD_send_socket_state_cork_nodelay_ (connection,
493 IPPROTO_TCP, 493 false,
494 TCP_CORK, 494 true,
495 (const void *) &off_val, 495 true,
496 sizeof (off_val))) 496 true);
497 {
498 connection->sk_tcp_nodelay_on = true;
499 }
500 else if (0 == setsockopt (connection->socket_fd,
501 IPPROTO_TCP,
502 TCP_NODELAY,
503 (const void *) &on_val,
504 sizeof (on_val)))
505 {
506 connection->sk_tcp_nodelay_on = true;
507 }
508 } 497 }
509#elif TCP_NOPUSH 498#elif TCP_NOPUSH
510 /* TCP_NOPUSH on FreeBSD is equal to cork on Linux, with the 499 /* TCP_NOPUSH on FreeBSD is equal to cork on Linux, with the