yamt commented on a change in pull request #346:
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/346#discussion_r466848860



##########
File path: netutils/webclient/webclient.c
##########
@@ -658,12 +658,18 @@ static int wget_base(FAR const char *url, FAR char 
*buffer, int buflen,
 
       len = dest - buffer;
 
-      ret = send(sockfd, buffer, len, 0);
-      if (ret < 0)
+      do
         {
-          nerr("ERROR: send failed: %d\n", errno);
-          goto errout;
+          ret = send(sockfd, buffer + ((dest - buffer) - len), len, 0);
+          if (ret < 0)
+            {
+              nerr("ERROR: send failed: %d\n", errno);
+              goto errout;
+            }
+
+          len -= ret;
         }
+      while (len > 0);

Review comment:
       does this mean short-writes on a blocking socket?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to