File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -264,6 +264,15 @@ void ClientCallData::RecvTrailingMetadataReadyCallback(
264
264
}
265
265
266
266
void ClientCallData::RecvTrailingMetadataReady (grpc_error_handle error) {
267
+ // If we were cancelled prior to receiving this callback, we should simply
268
+ // forward the callback up with the same error.
269
+ if (recv_trailing_state_ == RecvTrailingState::kCancelled ) {
270
+ if (grpc_closure* call_closure =
271
+ absl::exchange (original_recv_trailing_metadata_ready_, nullptr )) {
272
+ Closure::Run (DEBUG_LOCATION, call_closure, GRPC_ERROR_REF (error));
273
+ }
274
+ return ;
275
+ }
267
276
// If there was an error, we'll put that into the trailing metadata and
268
277
// proceed as if there was not.
269
278
if (error != GRPC_ERROR_NONE) {
You can’t perform that action at this time.
0 commit comments