aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/mhd_send.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/mhd_send.c')
-rw-r--r--src/microhttpd/mhd_send.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c
index f087a326..18fa617f 100644
--- a/src/microhttpd/mhd_send.c
+++ b/src/microhttpd/mhd_send.c
@@ -165,23 +165,27 @@ MHD_send_on_connection_ (struct MHD_Connection *connection,
165 */ 165 */
166 if ((use_corknopush) && (have_cork && ! want_cork)) 166 if ((use_corknopush) && (have_cork && ! want_cork))
167 { 167 {
168 setsockopt (connection->socket_fd, 168 if (0 == setsockopt (connection->socket_fd,
169 IPPROTO_TCP, 169 IPPROTO_TCP,
170 TCP_NOPUSH, 170 TCP_NOPUSH,
171 (const void *) &on_val, 171 (const void *) &on_val,
172 sizeof (on_val)); 172 sizeof (on_val)))
173 connection->sk_tcp_nodelay_on = false; 173 {
174 connection->sk_tcp_nodelay_on = false;
175 }
174 } 176 }
175#endif 177#endif
176#if TCP_NODELAY 178#if TCP_NODELAY
177 if ((! use_corknopush) && (! have_cork && want_cork)) 179 if ((! use_corknopush) && (! have_cork && want_cork))
178 { 180 {
179 setsockopt (connection->socket_fd, 181 if (0 == setsockopt (connection->socket_fd,
180 IPPROTO_TCP, 182 IPPROTO_TCP,
181 TCP_NODELAY, 183 TCP_NODELAY,
182 (const void *) &off_val, 184 (const void *) &off_val,
183 sizeof (off_val)); 185 sizeof (off_val)))
184 connection->sk_tcp_nodelay_on = false; 186 {
187 connection->sk_tcp_nodelay_on = false;
188 }
185 } 189 }
186#endif 190#endif
187 191