Skip to content
Snippets Groups Projects
Commit 60e63d41 authored by Craig Tiller's avatar Craig Tiller
Browse files

Fixes

parent d7ee291d
No related branches found
No related tags found
No related merge requests found
...@@ -1560,7 +1560,6 @@ void grpc_chttp2_mark_stream_closed(grpc_exec_ctx *exec_ctx, ...@@ -1560,7 +1560,6 @@ void grpc_chttp2_mark_stream_closed(grpc_exec_ctx *exec_ctx,
return; return;
} }
if (close_reads && !s->read_closed) { 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_error = GRPC_ERROR_REF(error);
s->read_closed = true; s->read_closed = true;
for (int i = 0; i < 2; i++) { for (int i = 0; i < 2; i++) {
...@@ -1571,22 +1570,23 @@ void grpc_chttp2_mark_stream_closed(grpc_exec_ctx *exec_ctx, ...@@ -1571,22 +1570,23 @@ void grpc_chttp2_mark_stream_closed(grpc_exec_ctx *exec_ctx,
decrement_active_streams_locked(exec_ctx, t, s); decrement_active_streams_locked(exec_ctx, t, s);
grpc_chttp2_maybe_complete_recv_initial_metadata(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_message(exec_ctx, t, s);
grpc_chttp2_maybe_complete_recv_trailing_metadata(exec_ctx, t, s);
} }
if (close_writes && !s->write_closed) { if (close_writes && !s->write_closed) {
s->write_closed_error = GRPC_ERROR_REF(error); s->write_closed_error = GRPC_ERROR_REF(error);
s->write_closed = true; s->write_closed = true;
grpc_chttp2_fail_pending_writes(exec_ctx, t, s, GRPC_ERROR_REF(error)); 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) { if (s->read_closed && s->write_closed) {
grpc_error *overall_error =
removal_error(GRPC_ERROR_REF(error), s, "Stream removed");
if (s->id != 0) { if (s->id != 0) {
remove_stream(exec_ctx, t, s->id, remove_stream(exec_ctx, t, s->id, GRPC_ERROR_REF(overall_error));
removal_error(GRPC_ERROR_REF(error), s, "Stream removed"));
} else { } else {
/* Purge streams waiting on concurrency still waiting for id assignment */ /* Purge streams waiting on concurrency still waiting for id assignment */
grpc_chttp2_list_remove_waiting_for_concurrency(t, s); 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_CHTTP2_STREAM_UNREF(exec_ctx, s, "chttp2");
} }
GRPC_ERROR_UNREF(error); GRPC_ERROR_UNREF(error);
......
...@@ -627,6 +627,11 @@ static void get_final_status(grpc_call *call, ...@@ -627,6 +627,11 @@ static void get_final_status(grpc_call *call,
static void set_status_from_error(grpc_exec_ctx *exec_ctx, grpc_call *call, static void set_status_from_error(grpc_exec_ctx *exec_ctx, grpc_call *call,
status_source source, grpc_error *error) { status_source source, grpc_error *error) {
const char *es = grpc_error_string(error);
gpr_log(GPR_DEBUG, "%p[%d]: set %d[is_set=%d] to %s", call, call->is_client,
source, call->status[source].is_set, es);
grpc_error_free_string(es);
if (call->status[source].is_set) { if (call->status[source].is_set) {
GRPC_ERROR_UNREF(error); GRPC_ERROR_UNREF(error);
return; return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment