aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2020-12-28 09:58:40 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2020-12-28 09:58:40 +0300
commitf1ba9b430e0ae547b62f25d40130eb26502f2bcb (patch)
treecee4112d25a8738515f308fe44a60b3eb96e593f
parent2da6d2d8002370a3597f3080350920c8c26b85c3 (diff)
downloadlibmicrohttpd-f1ba9b430e0ae547b62f25d40130eb26502f2bcb.tar.gz
libmicrohttpd-f1ba9b430e0ae547b62f25d40130eb26502f2bcb.zip
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.
-rw-r--r--src/microhttpd/mhd_send.c3
1 files changed, 2 insertions, 1 deletions
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,
884 884
885 if ( (header_size == (size_t) ret) && 885 if ( (header_size == (size_t) ret) &&
886 ((size_t) SSIZE_MAX > header_size) && 886 ((size_t) SSIZE_MAX > header_size) &&
887 (0 != body_size) ) 887 (0 != body_size) &&
888 (connection->sk_nonblck) )
888 { 889 {
889 ssize_t ret2; 890 ssize_t ret2;
890 /* The header has been sent completely. 891 /* The header has been sent completely.