[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 40/173: sws: retry send() on EWOULDBLOCK
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 40/173: sws: retry send() on EWOULDBLOCK |
Date: |
Fri, 24 Feb 2017 14:01:02 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to annotated tag gnurl-7.53.1
in repository gnurl.
commit 62e67c77722d3bb936201a813fa318c4304db794
Author: Daniel Stenberg <address@hidden>
AuthorDate: Sun Jan 8 17:50:07 2017 +0100
sws: retry send() on EWOULDBLOCK
Fixes spurious test 1060 and 1061 failures on OpenBSD, Solaris and more.
Bug: https://curl.haxx.se/mail/lib-2017-01/0009.html
Reported-by: Christian Weisgerber
---
tests/server/sws.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/tests/server/sws.c b/tests/server/sws.c
index c4125a0a8..63e9fdf5c 100644
--- a/tests/server/sws.c
+++ b/tests/server/sws.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <address@hidden>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -1200,14 +1200,21 @@ static int send_doc(curl_socket_t sock, struct
httprequest *req)
size_t num = count;
if(num > 200)
num = 200;
+
+ retry:
written = swrite(sock, buffer, num);
if(written < 0) {
+ if((EWOULDBLOCK == errno) || (EAGAIN == errno)) {
+ wait_ms(10);
+ goto retry;
+ }
sendfailure = TRUE;
break;
}
else {
logmsg("Sent off %zd bytes", written);
}
+
/* write to file as well */
fwrite(buffer, 1, (size_t)written, dump);
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 112/173: darwinssl: Avoid parsing certificates when not in verbose mode, (continued)
- [GNUnet-SVN] [gnurl] 112/173: darwinssl: Avoid parsing certificates when not in verbose mode, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 95/173: cookies: do not assume a valid domain has a dot, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 66/173: TODO: Chunked transfer multipart formpost, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 137/173: TODO: consider file name from the redirected URL with -O ?, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 107/173: use *.sourceforge.io and misc URL updates, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 70/173: docs: improved language in README.md HISTORY.md CONTRIBUTE.md, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 113/173: test552: Fix typos, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 131/173: configure: Allow disabling pthreads, fall back on Win32 threads, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 103/173: openssl: Don't use certificate after transferring ownership, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 141/173: proxy: fix hostname resolution and IDN conversion, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 40/173: sws: retry send() on EWOULDBLOCK,
gnunet <=
- [GNUnet-SVN] [gnurl] 108/173: cmdline-opts: Fixed build and test in out of source tree builds, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 123/173: examples/multithread.c: link to our multi-thread docs, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 152/173: digest_sspi: Handle 'stale=TRUE' directive in HTTP digest, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 129/173: tool_operate: Show HTTPS-Proxy options on CURLE_SSL_CACERT, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 151/173: smb: use getpid replacement for windows UWP builds, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 65/173: TODO: Improve formpost API, not just add an easy argument, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 90/173: cmdline-opts/gen.pl: Open input files in CRLF mode, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 59/173: next.d: --trace and --trace-ascii are also global, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 72/173: nss: use the correct lock in nss_find_slot_by_name(), gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 44/173: STARTTLS: Don't print response character in denied messages, gnunet, 2017/02/24