On Wed, 4 Jan 2017, Christian Weisgerber wrote:

That's the swrite() in tests/server/sws.c line 1203 that fails. Further debugging shows the error to be EAGAIN. Shouldn't this be non-fatal and retried?

Okay, so can you please apply this test patch and see if it makes things work better? I did a first quick test with non-blocking simply switched off but that didn't work, so this is my next quick and dirty experiment.


diff --git a/tests/server/sws.c b/tests/server/sws.c
index c4125a0a8..6cebe930e 100644
--- a/tests/server/sws.c
+++ b/tests/server/sws.c
@@ -1198,12 +1198,17 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
        larger chunks are split up so that the client will need to do multiple
        recv() calls to get it and thus we exercise that code better */
     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);


--

 / daniel.haxx.se
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html

Reply via email to