aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/daemon.c
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2018-12-10 22:14:59 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2018-12-10 22:14:59 +0300
commite13c79ee3b5208c8b94538144abe58eab099b3f8 (patch)
treedccd90d3b8b5d5c8a94d6ac8572250e36536bb2e /src/microhttpd/daemon.c
parent4b5e8e0b45cde5f80f160d1abd42e604503b3544 (diff)
downloadlibmicrohttpd-e13c79ee3b5208c8b94538144abe58eab099b3f8.tar.gz
libmicrohttpd-e13c79ee3b5208c8b94538144abe58eab099b3f8.zip
Track socket CORK/NODELAY states to avoid extra syscalls
Diffstat (limited to 'src/microhttpd/daemon.c')
-rw-r--r--src/microhttpd/daemon.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 2c162def..ea12a532 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -3020,6 +3020,15 @@ MHD_add_connection (struct MHD_Daemon *daemon,
3020 _("Failed to set noninheritable mode on new client socket.\n")); 3020 _("Failed to set noninheritable mode on new client socket.\n"));
3021#endif 3021#endif
3022 } 3022 }
3023
3024 if ( (0 == (daemon->options & MHD_USE_TURBO)) &&
3025 (! MHD_socket_buffering_reset_ (client_socket)) )
3026 {
3027#ifdef HAVE_MESSAGES
3028 MHD_DLOG (daemon,
3029 _("Failed to reset buffering mode on new client socket.\n"));
3030#endif
3031 }
3023 return internal_add_connection (daemon, 3032 return internal_add_connection (daemon,
3024 client_socket, 3033 client_socket,
3025 addr, 3034 addr,