diff options
author | Valentin Bartenev <vbart@nginx.com> | 2015-03-23 20:47:46 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2015-03-23 20:47:46 +0300 |
commit | 44586bf5ee34a56f877ab04dc79fed279e1d52cb (patch) | |
tree | 2c5a1fb645d7fd0b706f425276effd754bf2a1e1 | |
parent | 67986d81de51fae187704a496acad03d84461272 (diff) | |
download | nginx-44586bf5ee34a56f877ab04dc79fed279e1d52cb.tar.gz |
SPDY: fixed error handling in ngx_http_spdy_send_output_queue().
-rw-r--r-- | src/http/ngx_http_spdy.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/http/ngx_http_spdy.c b/src/http/ngx_http_spdy.c index 13b81a63a..c35c31a18 100644 --- 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_spdy_connection_t *sc) 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_spdy_connection_t *sc) sc->last_out = frame; return NGX_OK; + +error: + + c->error = 1; + + if (!sc->blocked) { + ngx_post_event(wev, &ngx_posted_events); + } + + return NGX_ERROR; } |