aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2018-12-20 16:16:00 -0800
committerGravatar Yash Tibrewal <yashkt@google.com>2018-12-20 16:16:00 -0800
commitb09ed93d02197235471e6e65df2df2cbeb506f50 (patch)
treec381dc7435e29dcab8c3690e91676be8e446f416 /src
parent30e1991bf93e010964ccaf326081398ed3cd4e4e (diff)
Revert changes to Context list cleanup
Diffstat (limited to 'src')
-rw-r--r--src/core/ext/transport/chttp2/transport/chttp2_transport.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
index 9e03c90ccb..78833723a2 100644
--- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
+++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
@@ -170,6 +170,14 @@ grpc_chttp2_transport::~grpc_chttp2_transport() {
grpc_slice_buffer_destroy_internal(&outbuf);
grpc_chttp2_hpack_compressor_destroy(&hpack_compressor);
+ grpc_error* error =
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING("Transport destroyed");
+ // ContextList::Execute follows semantics of a callback function and does not
+ // take a ref on error
+ grpc_core::ContextList::Execute(t->cl, nullptr, error);
+ GRPC_ERROR_UNREF(error);
+ t->cl = nullptr;
+
grpc_slice_buffer_destroy_internal(&read_buffer);
grpc_chttp2_hpack_parser_destroy(&hpack_parser);
grpc_chttp2_goaway_parser_destroy(&goaway_parser);
@@ -566,10 +574,6 @@ static void close_transport_locked(grpc_chttp2_transport* t,
grpc_error* error) {
end_all_the_calls(t, GRPC_ERROR_REF(error));
cancel_pings(t, GRPC_ERROR_REF(error));
- // ContextList::Execute follows semantics of a callback function and does not
- // need a ref on error
- grpc_core::ContextList::Execute(t->cl, nullptr, error);
- t->cl = nullptr;
if (t->closed_with_error == GRPC_ERROR_NONE) {
if (!grpc_error_has_clear_grpc_status(error)) {
error = grpc_error_set_int(error, GRPC_ERROR_INT_GRPC_STATUS,