httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Terbush <ra...@zyzzyva.com>
Subject Re: [PATCH] PR#502: timeout problems (second try)
Date Mon, 12 May 1997 14:01:40 GMT

+1

This does seem to help with a few corner cases I was seeing...


> If a soft_timeout occurs after keepalive is set, then the main child
> loop would try to read another request even though the connection
> has been aborted.  This might just fix PR#502, though I can't reproduce
> the reported problem.
> 
> .....Roy
> 
> Index: http_main.c
> ===================================================================
> RCS file: /export/home/cvs/apache/src/http_main.c,v
> retrieving revision 1.143
> diff -c -r1.143 http_main.c
> *** http_main.c	1997/05/08 07:57:44	1.143
> --- http_main.c	1997/05/12 00:41:07
> ***************
> *** 1861,1868 ****
>            * until no requests are left or we decide to close.
>            */
>   
> !         for (;;) {
> !             r = read_request(current_conn);
>   
>   	    /* ok we've read the request... it's a little too late
>   	     * to do a graceful restart, so ignore them for now.
> --- 1861,1867 ----
>            * until no requests are left or we decide to close.
>            */
>   
> !         while ((r = read_request(current_conn)) != NULL) {
>   
>   	    /* ok we've read the request... it's a little too late
>   	     * to do a graceful restart, so ignore them for now.
> ***************
> *** 1871,1881 ****
>   
>               (void)update_child_status(child_num, SERVER_BUSY_WRITE, r);
>   
> !             if (r) process_request(r); /* else premature EOF --- ignore */
>   #if defined(STATUS)
> !             if (r) increment_counts(child_num, r);
>   #endif
> !             if (!r || !current_conn->keepalive)
>                   break;
>   
>               destroy_pool(r->pool);
> --- 1870,1880 ----
>   
>               (void)update_child_status(child_num, SERVER_BUSY_WRITE, r);
>   
> !             process_request(r);
>   #if defined(STATUS)
> !             increment_counts(child_num, r);
>   #endif
> !             if (!current_conn->keepalive || current_conn->aborted)
>                   break;
>   
>               destroy_pool(r->pool);
> ***************
> *** 2468,2474 ****
>   	r = read_request (conn);
>   	if (r) process_request (r); /* else premature EOF (ignore) */
>   
> !         while (r && conn->keepalive) {
>   	    destroy_pool(r->pool);
>               r = read_request (conn);
>               if (r) process_request (r);
> --- 2467,2473 ----
>   	r = read_request (conn);
>   	if (r) process_request (r); /* else premature EOF (ignore) */
>   
> !         while (r && conn->keepalive && !conn->aborted) {
>   	    destroy_pool(r->pool);
>               r = read_request (conn);
>               if (r) process_request (r);




Mime
View raw message