diff --git a/src/core/handshaker/security/security_handshaker.cc b/src/core/handshaker/security/security_handshaker.cc index 65fec6243a7..82756fc8723 100644 --- a/src/core/handshaker/security/security_handshaker.cc +++ b/src/core/handshaker/security/security_handshaker.cc @@ -358,16 +358,12 @@ grpc_error_handle SecurityHandshaker::OnHandshakeNextDoneLocked( return error; } if (result != TSI_OK) { - auto* security_connector = args_->args.GetObject(); - absl::string_view connector_type = ""; - if (security_connector != nullptr) { - connector_type = security_connector->type().name(); - } // TODO(roth): Get a better signal from the TSI layer as to what // status code we should use here. return GRPC_ERROR_CREATE(absl::StrCat( - connector_type, " handshake failed (", tsi_result_to_string(result), - ")", (tsi_handshake_error_.empty() ? "" : ": "), tsi_handshake_error_)); + connector_->type().name(), " handshake failed (", + tsi_result_to_string(result), ")", + (tsi_handshake_error_.empty() ? "" : ": "), tsi_handshake_error_)); } // Update handshaker result. if (handshaker_result != nullptr) {