aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/daemon.c')
-rw-r--r--src/microhttpd/daemon.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index bf01ba9b..16655f65 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -3224,6 +3224,19 @@ MHD_accept_connection (struct MHD_Daemon *daemon)
3224 } 3224 }
3225 return MHD_NO; 3225 return MHD_NO;
3226 } 3226 }
3227#if defined(MHD_TCP_CORK_NOPUSH) || defined(HAVE_MSG_MORE)
3228 /* We will use TCP_CORK or TCP_NOPUSH or MSG_MORE to control
3229 transmission, disable Nagle's algorithm (always) */
3230 if (0 != MHD_socket_set_nodelay_ (s,
3231 true))
3232 {
3233#ifdef HAVE_MESSAGES
3234 MHD_DLOG (daemon,
3235 _("Failed to disable TCP Nagle on socket: %s\n"),
3236 MHD_socket_last_strerr_());
3237 }
3238#endif
3239#endif
3227#if !defined(USE_ACCEPT4) || !defined(HAVE_SOCK_NONBLOCK) 3240#if !defined(USE_ACCEPT4) || !defined(HAVE_SOCK_NONBLOCK)
3228 if (! MHD_socket_nonblocking_ (s)) 3241 if (! MHD_socket_nonblocking_ (s))
3229 { 3242 {
@@ -6223,7 +6236,6 @@ MHD_start_daemon_va (unsigned int flags,
6223 } 6236 }
6224 } 6237 }
6225#endif /* HAVE_GETSOCKNAME */ 6238#endif /* HAVE_GETSOCKNAME */
6226
6227 if ( (MHD_INVALID_SOCKET != listen_fd) && 6239 if ( (MHD_INVALID_SOCKET != listen_fd) &&
6228 (! MHD_socket_nonblocking_ (listen_fd)) ) 6240 (! MHD_socket_nonblocking_ (listen_fd)) )
6229 { 6241 {