diff options
author | Yann Ylavic <ylavic@apache.org> | 2017-11-02 23:19:23 +0100 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2017-11-02 23:19:23 +0100 |
commit | 70bfc1c0bfff2fa2bde109c9978cf2d0ec6452f0 (patch) | |
tree | 2a5f08bf42ba37a5c121a409fd26a2c70214fed6 | |
parent | mpm_unix(es): cleanup properly on exit in one_process mode. (diff) | |
download | apache2-70bfc1c0bfff2fa2bde109c9978cf2d0ec6452f0.tar.xz apache2-70bfc1c0bfff2fa2bde109c9978cf2d0ec6452f0.zip |
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).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1814118 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | support/ab.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/support/ab.c b/support/ab.c index 89310a0df8..38ebb3dcc2 100644 --- a/support/ab.c +++ b/support/ab.c @@ -845,23 +845,21 @@ static void write_request(struct connection * c) 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; |