[PATCH] SPDY: send PING reply frame right away.

Piotr Sikora piotr at cloudflare.com
Mon Jan 13 23:45:31 UTC 2014


Hello Valentin,

> Thank you for the patch.  But, there is also no much sense in trying
> to send queue as soon as the PING frame was added (i.e. parsed from
> input buffer).
>
> The same is true as well for your next patch for the SETTINGS frame.

I wouldn't go as far as "no much sense" but your patch looks indeed better.

> I am going to fix the problem by this change:
>
> diff -r bbf87b408b92 src/http/ngx_http_spdy.c
> --- a/src/http/ngx_http_spdy.c  Fri Jan 10 02:08:12 2014 +0400
> +++ b/src/http/ngx_http_spdy.c  Sat Jan 11 05:20:50 2014 +0400
> @@ -378,6 +378,15 @@ ngx_http_spdy_read_handler(ngx_event_t *
>          return;
>      }
>
> +    if (sc->last_out) {
> +        if (ngx_http_spdy_send_output_queue(sc) == NGX_ERROR) {
> +            ngx_http_spdy_finalize_connection(sc,
> +                                    c->error ? NGX_HTTP_CLIENT_CLOSED_REQUEST
> +                                             : NGX_HTTP_INTERNAL_SERVER_ERROR);
> +            return;
> +        }
> +    }
> +
>      sc->blocked = 0;
>
>      if (sc->processing) {
>
> Any objections?

Nope, it fixes the original problem. Thanks!

Best regards,
Piotr Sikora



More information about the nginx-devel mailing list