[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 01/02: mhd_send: do not emulate sendmsg() on blocking so
From: |
gnunet |
Subject: |
[libmicrohttpd] 01/02: mhd_send: do not emulate sendmsg() on blocking sockets |
Date: |
Mon, 28 Dec 2020 08:18:55 +0100 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit f1ba9b430e0ae547b62f25d40130eb26502f2bcb
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Mon Dec 28 09:58:40 2020 +0300
mhd_send: do not emulate sendmsg() on blocking sockets
If OS doesn't support non-blocking sockets then additional call of
select() or poll() is required to lower chances of being blocked.
---
src/microhttpd/mhd_send.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c
index a4c58516..3f3a1cdc 100644
--- a/src/microhttpd/mhd_send.c
+++ b/src/microhttpd/mhd_send.c
@@ -884,7 +884,8 @@ MHD_send_hdr_and_body_ (struct MHD_Connection *connection,
if ( (header_size == (size_t) ret) &&
((size_t) SSIZE_MAX > header_size) &&
- (0 != body_size) )
+ (0 != body_size) &&
+ (connection->sk_nonblck) )
{
ssize_t ret2;
/* The header has been sent completely.
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.