diff options
Diffstat (limited to 'src/microhttpd/mhd_send.c')
-rw-r--r-- | src/microhttpd/mhd_send.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c index 4c937078..0cdd1265 100644 --- a/src/microhttpd/mhd_send.c +++ b/src/microhttpd/mhd_send.c | |||
@@ -194,14 +194,17 @@ pre_send_setopt (struct MHD_Connection *connection, | |||
194 | /* CORK/NOPUSH do not exist on this platform, | 194 | /* CORK/NOPUSH do not exist on this platform, |
195 | Turning on/off of Naggle's algorithm | 195 | Turning on/off of Naggle's algorithm |
196 | (otherwise we keep it always off) */ | 196 | (otherwise we keep it always off) */ |
197 | if (connection->sk_cork_on == buffer_data) | 197 | if (connection->sk_nodelay == push_data) |
198 | { | 198 | { |
199 | /* nothing to do, success! */ | 199 | /* nothing to do, success! */ |
200 | return; | 200 | return; |
201 | } | 201 | } |
202 | if (0 == MHD_socket_set_nodelay_ (connection->socket_fd, | 202 | if (0 == MHD_socket_set_nodelay_ (connection->socket_fd, |
203 | (push_data))) | 203 | (push_data))) |
204 | connection->sk_cork_on = !push_data; | 204 | { |
205 | connection->sk_cork_on = ! push_data; | ||
206 | connection->sk_nodelay = push_data; | ||
207 | } | ||
205 | #endif | 208 | #endif |
206 | } | 209 | } |
207 | 210 | ||
@@ -430,7 +433,7 @@ MHD_send_on_connection_ (struct MHD_Connection *connection, | |||
430 | #endif /* EPOLL_SUPPORT */ | 433 | #endif /* EPOLL_SUPPORT */ |
431 | } | 434 | } |
432 | post_send_setopt (connection, tls_conn, | 435 | post_send_setopt (connection, tls_conn, |
433 | (push_data && (buffer_size == (size_t) ret)) ); | 436 | (push_data && (buffer_size == (size_t) ret)) ); |
434 | 437 | ||
435 | return ret; | 438 | return ret; |
436 | } | 439 | } |