sc = stream->connection;
- ngx_log_debug2(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
- "spdy close stream %ui, processing %ui",
- stream->id, sc->processing);
+ ngx_log_debug3(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
+ "spdy close stream %ui, queued %ui, processing %ui",
+ stream->id, stream->queued, sc->processing);
+
+ fc = stream->request->connection;
+
+ if (stream->queued) {
+ fc->write->handler = ngx_http_spdy_close_stream_handler;
+ return;
+ }
if (!stream->out_closed) {
if (ngx_http_spdy_send_rst_stream(sc, stream->id,
index = &s->index;
}
- fc = stream->request->connection;
-
ngx_http_free_request(stream->request, rc);
ev = fc->read;
fc->error = 1;
if (stream->queued) {
- r->blocked -= stream->queued;
stream->queued = 0;
ev = fc->write;
ngx_http_spdy_queue_blocked_frame(sc, frame);
- r->blocked++;
-
cln = ngx_http_cleanup_add(r, 0);
if (cln == NULL) {
return NGX_ERROR;
stream->queued++;
- r->main->blocked++;
-
return ngx_http_spdy_filter_send(r->connection, stream);
}
r = stream->request;
r->connection->sent += frame->size;
- r->blocked--;
if (frame->fin) {
stream->out_closed = 1;
{
ngx_http_spdy_stream_t *stream = data;
- ngx_http_request_t *r;
ngx_http_spdy_out_frame_t *frame, **fn;
if (stream->queued == 0) {
return;
}
- r = stream->request;
-
fn = &stream->connection->last_out;
for ( ;; ) {
}
if (frame->stream == stream && !frame->blocked) {
-
stream->queued--;
- r->blocked--;
*fn = frame->next;
continue;