# HG changeset patch # User Valentin Bartenev # Date 1427132866 -10800 # Node ID 7ba52c9953250ee07174087346fc3bd6cea70e3f # Parent 5c1b480ddcab600c1f9b9442ad28cd95ff0274fa SPDY: fixed error handling in ngx_http_spdy_send_output_queue(). diff --git a/src/http/ngx_http_spdy.c b/src/http/ngx_http_spdy.c --- a/src/http/ngx_http_spdy.c +++ b/src/http/ngx_http_spdy.c @@ -700,20 +700,14 @@ ngx_http_spdy_send_output_queue(ngx_http cl = c->send_chain(c, cl, 0); if (cl == NGX_CHAIN_ERROR) { - c->error = 1; - - if (!sc->blocked) { - ngx_post_event(wev, &ngx_posted_events); - } - - return NGX_ERROR; + goto error; } clcf = ngx_http_get_module_loc_conf(sc->http_connection->conf_ctx, ngx_http_core_module); if (ngx_handle_write_event(wev, clcf->send_lowat) != NGX_OK) { - return NGX_ERROR; /* FIXME */ + goto error; } if (cl) { @@ -751,6 +745,16 @@ ngx_http_spdy_send_output_queue(ngx_http sc->last_out = frame; return NGX_OK; + +error: + + c->error = 1; + + if (!sc->blocked) { + ngx_post_event(wev, &ngx_posted_events); + } + + return NGX_ERROR; }