You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2008/05/02 00:25:12 UTC

svn commit: r652693 - /apr/apr/branches/1.3.x/network_io/unix/sendrecv.c

Author: wrowe
Date: Thu May  1 15:25:11 2008
New Revision: 652693

URL: http://svn.apache.org/viewvc?rev=652693&view=rev
Log:
Optimize away a second poll by simply looping on the existing poll

Modified:
    apr/apr/branches/1.3.x/network_io/unix/sendrecv.c

Modified: apr/apr/branches/1.3.x/network_io/unix/sendrecv.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.3.x/network_io/unix/sendrecv.c?rev=652693&r1=652692&r2=652693&view=diff
==============================================================================
--- apr/apr/branches/1.3.x/network_io/unix/sendrecv.c (original)
+++ apr/apr/branches/1.3.x/network_io/unix/sendrecv.c Thu May  1 15:25:11 2008
@@ -507,13 +507,9 @@
                 rv = 0;
             }
         }
-        if ((rv == -1) && (errno == EAGAIN) 
-                       && (sock->timeout > 0)) {
-            apr_status_t arv = apr_wait_for_io_or_timeout(NULL, sock, 0);
-            if (arv != APR_SUCCESS) {
-                *len = 0;
-                return arv;
-            }
+
+        if ((rv == -1) && (errno == EAGAIN) && (sock->timeout > 0)) {
+            sock->options |= APR_INCOMPLETE_WRITE;
         }
     } while (rv == -1 && (errno == EINTR || errno == EAGAIN));