comparison src/http/ngx_http_spdy.c @ 6058:7ba52c995325

SPDY: fixed error handling in ngx_http_spdy_send_output_queue().
author Valentin Bartenev <vbart@nginx.com>
date Mon, 23 Mar 2015 20:47:46 +0300
parents 199c0dd313ea
children c81d79a7befd
comparison
equal deleted inserted replaced
6057:5c1b480ddcab 6058:7ba52c995325
698 } 698 }
699 699
700 cl = c->send_chain(c, cl, 0); 700 cl = c->send_chain(c, cl, 0);
701 701
702 if (cl == NGX_CHAIN_ERROR) { 702 if (cl == NGX_CHAIN_ERROR) {
703 c->error = 1; 703 goto error;
704
705 if (!sc->blocked) {
706 ngx_post_event(wev, &ngx_posted_events);
707 }
708
709 return NGX_ERROR;
710 } 704 }
711 705
712 clcf = ngx_http_get_module_loc_conf(sc->http_connection->conf_ctx, 706 clcf = ngx_http_get_module_loc_conf(sc->http_connection->conf_ctx,
713 ngx_http_core_module); 707 ngx_http_core_module);
714 708
715 if (ngx_handle_write_event(wev, clcf->send_lowat) != NGX_OK) { 709 if (ngx_handle_write_event(wev, clcf->send_lowat) != NGX_OK) {
716 return NGX_ERROR; /* FIXME */ 710 goto error;
717 } 711 }
718 712
719 if (cl) { 713 if (cl) {
720 ngx_add_timer(wev, clcf->send_timeout); 714 ngx_add_timer(wev, clcf->send_timeout);
721 715
749 } 743 }
750 744
751 sc->last_out = frame; 745 sc->last_out = frame;
752 746
753 return NGX_OK; 747 return NGX_OK;
748
749 error:
750
751 c->error = 1;
752
753 if (!sc->blocked) {
754 ngx_post_event(wev, &ngx_posted_events);
755 }
756
757 return NGX_ERROR;
754 } 758 }
755 759
756 760
757 static void 761 static void
758 ngx_http_spdy_handle_connection(ngx_http_spdy_connection_t *sc) 762 ngx_http_spdy_handle_connection(ngx_http_spdy_connection_t *sc)