diff options
Diffstat (limited to 'src/microhttpd/mhd_send.c')
-rw-r--r-- | src/microhttpd/mhd_send.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c index c2cded87..f3028293 100644 --- a/src/microhttpd/mhd_send.c +++ b/src/microhttpd/mhd_send.c @@ -1288,7 +1288,7 @@ send_iov_nontls (struct MHD_Connection *connection, return MHD_ERR_NOTCONN_; } - pre_send_setopt (connection, false, push_data); + pre_send_setopt (connection, true, push_data); items_to_send = r_iov->cnt - r_iov->sent; #ifdef HAVE_SENDMSG @@ -1296,7 +1296,12 @@ send_iov_nontls (struct MHD_Connection *connection, msg.msg_iov = r_iov->iov + r_iov->sent; msg.msg_iovlen = items_to_send; +#ifdef MHD_USE_MSG_MORE + res = sendmsg (connection->socket_fd, &msg, + MSG_NOSIGNAL_OR_ZERO | (push_data ? 0 : MSG_MORE)); +#else /* ! MHD_USE_MSG_MORE */ res = sendmsg (connection->socket_fd, &msg, MSG_NOSIGNAL_OR_ZERO); +#endif /* ! MHD_USE_MSG_MORE */ #elif defined(HAVE_WRITEV) res = writev (connection->socket_fd, r_iov->iov + r_iov->sent, items_to_send); @@ -1349,7 +1354,7 @@ send_iov_nontls (struct MHD_Connection *connection, } if (r_iov->cnt == r_iov->sent) - post_send_setopt (connection, false, push_data); + post_send_setopt (connection, true, push_data); else { #ifdef EPOLL_SUPPORT |