aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-06-24 11:27:24 +0000
committerng0 <ng0@n0.is>2019-06-25 08:01:48 +0000
commit9af4a482e857fd14b10a1bc52e71d971d9f081a7 (patch)
tree6d2f8110834a0ce4a5d1a0bc52b5cb27ce958b6c
parentbeae0da3aedd2c8eb40aef3882f8b34de22b17b6 (diff)
downloadlibmicrohttpd-9af4a482e857fd14b10a1bc52e71d971d9f081a7.tar.gz
libmicrohttpd-9af4a482e857fd14b10a1bc52e71d971d9f081a7.zip
mhd_send.c: Try to guess the right branch to close.
-rw-r--r--src/microhttpd/mhd_send.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c
index 02ffceaa..c3724cba 100644
--- a/src/microhttpd/mhd_send.c
+++ b/src/microhttpd/mhd_send.c
@@ -284,7 +284,7 @@ MHD_send_on_connection2_ (struct MHD_Connection *connection,
284#if HAVE_WRITEV 284#if HAVE_WRITEV
285 MHD_socket s = connection->socket_fd; 285 MHD_socket s = connection->socket_fd;
286 bool have_cork, have_more; 286 bool have_cork, have_more;
287 int iovcnt, optval; 287 int iovcnt, optval, eno;
288 struct iovec vector[2]; 288 struct iovec vector[2];
289 289
290 have_cork = ! connection->sk_tcp_nodelay_on; 290 have_cork = ! connection->sk_tcp_nodelay_on;
@@ -322,7 +322,7 @@ MHD_send_on_connection2_ (struct MHD_Connection *connection,
322 ret = writev (connection->socket_fd, vector, iovcnt); 322 ret = writev (connection->socket_fd, vector, iovcnt);
323#if TCP_CORK 323#if TCP_CORK
324 { 324 {
325 int eno; 325 eno;
326 326
327 eno = errno; 327 eno = errno;
328 if ((ret == header_len + buffer_len) && have_cork) 328 if ((ret == header_len + buffer_len) && have_cork)
@@ -338,6 +338,7 @@ MHD_send_on_connection2_ (struct MHD_Connection *connection,
338 errno = eno; 338 errno = eno;
339 } 339 }
340 return ret; 340 return ret;
341#endif
341#else 342#else
342 return MHD_send_on_connection_ (connection, 343 return MHD_send_on_connection_ (connection,
343 header, 344 header,