httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Covener <cove...@gmail.com>
Subject Re: svn commit: r1137358 - in /httpd/httpd/trunk: CHANGES include/ap_mmn.h include/http_connection.h include/httpd.h include/scoreboard.h server/connection.c server/mpm/event/event.c server/mpm/event/fdqueue.c server/mpm/event/fdqueue.h
Date Sat, 24 Aug 2013 18:19:15 GMT
On Sun, Jun 19, 2011 at 8:23 AM,  <sf@apache.org> wrote:
> Author: sf
> Date: Sun Jun 19 12:23:42 2011
> New Revision: 1137358
>
> URL: http://svn.apache.org/viewvc?rev=1137358&view=rev
> Log:
> Some improvements for handling of many connections for MPM event:
>
> - Process lingering close asynchronously instead of tying up worker threads
>   (based on patch by Jeff Trawick).
>

> +    /* socket is already in non-blocking state */
> +    do {
> +        nbytes = sizeof(dummybuf);
> +        rv = apr_socket_recv(csd, dummybuf, &nbytes);
> +    } while (rv == APR_SUCCESS);
> +
> +    if (!APR_STATUS_IS_EOF(rv)) {
> +        return;
> +    }
> +
> +    rv = apr_pollset_remove(event_pollset, pfd);
> +    AP_DEBUG_ASSERT(rv == APR_SUCCESS);

I was looking at an issue in this area, it seems like the
corresponding code in ap_lingering_close is not so picky about
apr_socket_recv return code. It seems like we could continually get
ECONNABORTED/ECONNRESET back and not take the socket out of the ring
until the timeout elapses.

I'm wondering if the test should be APR_STATUS_IS_EAGAIN(), and
anything else that isn't success means we no longer need to linger?

Mime
View raw message