On Apr 6, 2005 8:22 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Author: wsanchez > Date: Wed Apr 6 17:22:29 2005 > New Revision: 160348 > > URL: http://svn.apache.org/viewcvs?view=rev&rev=160348 > Log: > In emulate_sendfile(), handle APR_EAGAIN from apr_socket_send().
> - rv = apr_socket_send(c->client_socket, &buffer[o], &bytes_sent); > - *nbytes += bytes_sent; > - if (rv == APR_SUCCESS) { > - sendlen -= bytes_sent; /* sendlen != bytes_sent ==> partial > write */ > - o += bytes_sent; /* o is where we are in the buffer */ > - togo -= bytes_sent; /* track how much of the file we've > sent */ > + if (rv == APR_SUCCESS && sendlen) { > + while ((rv == APR_SUCCESS || rv == APR_EAGAIN) && sendlen) { Why would EAGAIN be returned? There should be a timeout set on the APR socket. Either the send works within the timeout period or we get timeout error or we get some lower-level socket error. If EAGAIN is really returned, I suspect there is something else to investigate.