aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext/transport
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-12-14 07:23:42 -0800
committerGravatar Craig Tiller <ctiller@google.com>2017-01-06 14:53:14 -0800
commit60e63d41e18ccd57482fc9df1455513e080f7220 (patch)
treeb88f7cedb87e63f231a3bd2fb1b407a838a22978 /src/core/ext/transport
parentd7ee291d5f915e2663af4327961d587c45bffc5d (diff)
Fixes
Diffstat (limited to 'src/core/ext/transport')
-rw-r--r--src/core/ext/transport/chttp2/transport/chttp2_transport.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c
index 6a2a54a660..8bfacfac67 100644
--- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c
+++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c
@@ -1560,7 +1560,6 @@ void grpc_chttp2_mark_stream_closed(grpc_exec_ctx *exec_ctx,
return;
}
if (close_reads && !s->read_closed) {
- grpc_chttp2_fake_status(exec_ctx, t, s, GRPC_ERROR_REF(error));
s->read_closed_error = GRPC_ERROR_REF(error);
s->read_closed = true;
for (int i = 0; i < 2; i++) {
@@ -1571,22 +1570,23 @@ void grpc_chttp2_mark_stream_closed(grpc_exec_ctx *exec_ctx,
decrement_active_streams_locked(exec_ctx, t, s);
grpc_chttp2_maybe_complete_recv_initial_metadata(exec_ctx, t, s);
grpc_chttp2_maybe_complete_recv_message(exec_ctx, t, s);
- grpc_chttp2_maybe_complete_recv_trailing_metadata(exec_ctx, t, s);
}
if (close_writes && !s->write_closed) {
s->write_closed_error = GRPC_ERROR_REF(error);
s->write_closed = true;
grpc_chttp2_fail_pending_writes(exec_ctx, t, s, GRPC_ERROR_REF(error));
- grpc_chttp2_maybe_complete_recv_trailing_metadata(exec_ctx, t, s);
}
if (s->read_closed && s->write_closed) {
+ grpc_error *overall_error =
+ removal_error(GRPC_ERROR_REF(error), s, "Stream removed");
if (s->id != 0) {
- remove_stream(exec_ctx, t, s->id,
- removal_error(GRPC_ERROR_REF(error), s, "Stream removed"));
+ remove_stream(exec_ctx, t, s->id, GRPC_ERROR_REF(overall_error));
} else {
/* Purge streams waiting on concurrency still waiting for id assignment */
grpc_chttp2_list_remove_waiting_for_concurrency(t, s);
}
+ grpc_chttp2_fake_status(exec_ctx, t, s, overall_error);
+ grpc_chttp2_maybe_complete_recv_trailing_metadata(exec_ctx, t, s);
GRPC_CHTTP2_STREAM_UNREF(exec_ctx, s, "chttp2");
}
GRPC_ERROR_UNREF(error);