aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-11-03 07:04:30 -0800
committerGravatar Craig Tiller <ctiller@google.com>2015-11-03 07:04:30 -0800
commit4b65b1dec305edf96b05375155dc918c974a626a (patch)
tree2389e535cf271193ebb578b85503eacb8831cfed /src/core
parent592560310102a0ef6354ad0556a5a717e0dc73a0 (diff)
Fix for returned status
If we already have a status from the wire when we're disconnecting, leave it in place - don't overwrite it. Fixes disappearing_server_test.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/transport/chttp2_transport.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c
index 10f52f4923..3d98a4fb14 100644
--- a/src/core/transport/chttp2_transport.c
+++ b/src/core/transport/chttp2_transport.c
@@ -1026,18 +1026,13 @@ void grpc_chttp2_fake_status(grpc_exec_ctx *exec_ctx,
stream_global->seen_error = 1;
grpc_chttp2_list_add_check_read_ops(transport_global, stream_global);
}
- if (stream_global->published_trailing_metadata &&
- stream_global->recv_trailing_metadata_finished != NULL) {
- /* last chance replacement: we've received trailing metadata,
- but something more important has become available to signal
- to the upper layers - drop what we've got, and then publish
- what we want - which is safe because we haven't told anyone
- about the metadata yet */
- grpc_chttp2_incoming_metadata_buffer_reset(
- &stream_global->received_trailing_metadata);
- stream_global->published_trailing_metadata = 0;
- }
- if (!stream_global->published_trailing_metadata) {
+ /* stream_global->recv_trailing_metadata_finished gives us a
+ last chance replacement: we've received trailing metadata,
+ but something more important has become available to signal
+ to the upper layers - drop what we've got, and then publish
+ what we want - which is safe because we haven't told anyone
+ about the metadata yet */
+ if (!stream_global->published_trailing_metadata || stream_global->recv_trailing_metadata_finished != NULL) {
grpc_mdctx *mdctx =
TRANSPORT_FROM_GLOBAL(transport_global)->metadata_context;
char status_string[GPR_LTOA_MIN_BUFSIZE];