diff options
author | Yash Tibrewal <yashkt@google.com> | 2018-12-17 16:15:46 -0800 |
---|---|---|
committer | Yash Tibrewal <yashkt@google.com> | 2018-12-17 16:15:46 -0800 |
commit | 906cf5b428f31513321c8d2e3530aa7a03cca400 (patch) | |
tree | 4cfd0128d89993c10df6471aba5937764e919a03 /src/core/ext | |
parent | afc2fabe0c16efbf768c70f365688156b457619d (diff) |
Add error details on context list clearing
Diffstat (limited to 'src/core/ext')
-rw-r--r-- | src/core/ext/transport/chttp2/transport/chttp2_transport.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc index 9b6574b612..3b7c48a72c 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc @@ -170,9 +170,6 @@ grpc_chttp2_transport::~grpc_chttp2_transport() { grpc_slice_buffer_destroy_internal(&outbuf); grpc_chttp2_hpack_compressor_destroy(&hpack_compressor); - grpc_core::ContextList::Execute(cl, nullptr, GRPC_ERROR_NONE); - cl = nullptr; - grpc_slice_buffer_destroy_internal(&read_buffer); grpc_chttp2_hpack_parser_destroy(&hpack_parser); grpc_chttp2_goaway_parser_destroy(&goaway_parser); @@ -569,6 +566,10 @@ 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(cl, nullptr, error); + 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, |