httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@gmail.com>
Subject Re: svn commit: r160348 - httpd/httpd/trunk/server/core_filters.c
Date Thu, 07 Apr 2005 12:57:51 GMT
On Apr 6, 2005 8:22 PM, wsanchez@apache.org <wsanchez@apache.org> 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.

Mime
View raw message