diff options
Diffstat (limited to 'src/microhttpd/mhd_send.c')
-rw-r--r-- | src/microhttpd/mhd_send.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c index 1ff45231..f366ef67 100644 --- a/src/microhttpd/mhd_send.c +++ b/src/microhttpd/mhd_send.c | |||
@@ -405,7 +405,11 @@ MHD_send_on_connection2_ (struct MHD_Connection *connection, | |||
405 | (0 == buffer_size) && | 405 | (0 == buffer_size) && |
406 | connection->sk_cork_on) | 406 | connection->sk_cork_on) |
407 | { | 407 | { |
408 | (void) gnutls_record_uncork (connection->tls_session, 0); | 408 | int err; |
409 | |||
410 | err = gnutls_record_uncork (connection->tls_session, 0); | ||
411 | if (0 > err) | ||
412 | return ret; | ||
409 | connection->sk_cork_on = false; | 413 | connection->sk_cork_on = false; |
410 | } | 414 | } |
411 | return ret; | 415 | return ret; |
@@ -434,6 +438,9 @@ MHD_send_on_connection2_ (struct MHD_Connection *connection, | |||
434 | msg.msg_iovlen = 2; | 438 | msg.msg_iovlen = 2; |
435 | 439 | ||
436 | ret = sendmsg (s, &msg, MAYBE_MSG_NOSIGNAL); | 440 | ret = sendmsg (s, &msg, MAYBE_MSG_NOSIGNAL); |
441 | if ( (-1 == ret) && | ||
442 | (EAGAIN == errno) ) | ||
443 | return MHD_ERR_AGAIN_; | ||
437 | } | 444 | } |
438 | #elif HAVE_WRITEV | 445 | #elif HAVE_WRITEV |
439 | { | 446 | { |
@@ -441,6 +448,9 @@ MHD_send_on_connection2_ (struct MHD_Connection *connection, | |||
441 | 448 | ||
442 | iovcnt = sizeof (vector) / sizeof (struct iovec); | 449 | iovcnt = sizeof (vector) / sizeof (struct iovec); |
443 | ret = writev (s, vector, iovcnt); | 450 | ret = writev (s, vector, iovcnt); |
451 | if ( (-1 == ret) && | ||
452 | (EAGAIN == errno) ) | ||
453 | return MHD_ERR_AGAIN_; | ||
444 | } | 454 | } |
445 | #endif | 455 | #endif |
446 | 456 | ||