httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yla...@apache.org
Subject svn commit: r1814118 - /httpd/httpd/trunk/support/ab.c
Date Thu, 02 Nov 2017 22:19:23 GMT
Author: ylavic
Date: Thu Nov  2 22:19:23 2017
New Revision: 1814118

URL: http://svn.apache.org/viewvc?rev=1814118&view=rev
Log:
ab: follow up to r1811664.

apr_socket_send() can return both an error and data, account for data in
the latter case (i.e. let next call fail, if any).


Modified:
    httpd/httpd/trunk/support/ab.c

Modified: httpd/httpd/trunk/support/ab.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/ab.c?rev=1814118&r1=1814117&r2=1814118&view=diff
==============================================================================
--- httpd/httpd/trunk/support/ab.c (original)
+++ httpd/httpd/trunk/support/ab.c Thu Nov  2 22:19:23 2017
@@ -845,23 +845,21 @@ static void write_request(struct connect
                 return;
             }
             l = e;
-            e = APR_SUCCESS;
         }
         else
 #endif
         {
             e = apr_socket_send(c->aprsock, request + c->rwrote, &l);
-            if (e != APR_SUCCESS) {
+            if (e != APR_SUCCESS && !l) {
                 if (!APR_STATUS_IS_EAGAIN(e)) {
                     epipe++;
                     printf("Send request failed!\n");
                     close_connection(c);
-                    return;
                 }
-                if (!l) {
+                else {
                     set_polled_events(c, APR_POLLOUT);
-                    return;
                 }
+                return;
             }
         }
         totalposted += l;



Mime
View raw message