diff options
Diffstat (limited to 'src/microhttpd/daemon.c')
-rw-r--r-- | src/microhttpd/daemon.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index a8fc98c6..fb4abd5d 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -3229,6 +3229,19 @@ MHD_accept_connection (struct MHD_Daemon *daemon) | |||
3229 | } | 3229 | } |
3230 | return MHD_NO; | 3230 | return MHD_NO; |
3231 | } | 3231 | } |
3232 | #if defined(MHD_TCP_CORK_NOPUSH) || defined(HAVE_MSG_MORE) | ||
3233 | /* We will use TCP_CORK or TCP_NOPUSH or MSG_MORE to control | ||
3234 | transmission, disable Nagle's algorithm (always) */ | ||
3235 | if (0 != MHD_socket_set_nodelay_ (s, | ||
3236 | true)) | ||
3237 | { | ||
3238 | #ifdef HAVE_MESSAGES | ||
3239 | MHD_DLOG (daemon, | ||
3240 | _("Failed to disable TCP Nagle on socket: %s\n"), | ||
3241 | MHD_socket_last_strerr_()); | ||
3242 | } | ||
3243 | #endif | ||
3244 | #endif | ||
3232 | #if !defined(USE_ACCEPT4) || !defined(HAVE_SOCK_NONBLOCK) | 3245 | #if !defined(USE_ACCEPT4) || !defined(HAVE_SOCK_NONBLOCK) |
3233 | if (! MHD_socket_nonblocking_ (s)) | 3246 | if (! MHD_socket_nonblocking_ (s)) |
3234 | { | 3247 | { |
@@ -6228,7 +6241,6 @@ MHD_start_daemon_va (unsigned int flags, | |||
6228 | } | 6241 | } |
6229 | } | 6242 | } |
6230 | #endif /* HAVE_GETSOCKNAME */ | 6243 | #endif /* HAVE_GETSOCKNAME */ |
6231 | |||
6232 | if ( (MHD_INVALID_SOCKET != listen_fd) && | 6244 | if ( (MHD_INVALID_SOCKET != listen_fd) && |
6233 | (! MHD_socket_nonblocking_ (listen_fd)) ) | 6245 | (! MHD_socket_nonblocking_ (listen_fd)) ) |
6234 | { | 6246 | { |