httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yann Ylavic <ylavic....@gmail.com>
Subject Re: svn commit: r1729507 - in /httpd/httpd/trunk/modules: http2/mod_proxy_http2.c proxy/mod_proxy.c proxy/mod_proxy.h proxy/mod_proxy_ajp.c proxy/mod_proxy_http.c proxy/mod_proxy_wstunnel.c
Date Wed, 10 Feb 2016 20:52:57 GMT
On Wed, Feb 10, 2016 at 9:19 PM, Ruediger Pluem <rpluem@apache.org> wrote:
>
> On 02/10/2016 09:15 PM, Jim Jagielski wrote:
>> It looks like the whole retry was removed :(
>
> If you look at the old code before r1729507 there wasn't any retry in the mod_proxy_wstunnel
case.
> The loop had just one iteration. Hence my comment below.

Indeed, this was a fake loop, and still is..

> Why do we keep a loop at all?

I wanted to avoid a goto construction or early returns for the failing cases.
I could have used something like:
    rv = ...;
    if (rv == APR_SUCCESS) {
        ...;
        rv = ...;
        if (rv == APR_SUCCESS)...
    }
or:
    rv = ...;
    if (rv == APR_SUCCESS) {
        ...;
        rv = ...;
    }
    if (rv == APR_SUCCESS)...
but this was more change on the original code.

Maybe the comment:
> +    do { /* while (0): break out */
           ...
> +    } while (0);
isn't explicit enough?

Otherwise I can change the code to whatever you/dev@ prefer.

@Jim: this was yet another attempt for a do-while in httpd :)
(http://mail-archives.apache.org/mod_mbox/httpd-dev/201511.mbox/%3CCAKQ1sVOzutUqT3M1zy51W5C8B8AeVxtNBa=eEkrXOyK1OdEdRA@mail.gmail.com%3E)

Regards,
Yann.

Mime
View raw message