|
|
|
@ -28,6 +28,7 @@ |
|
|
|
|
|
|
|
|
|
#include <grpc/byte_buffer.h> |
|
|
|
|
#include <grpc/byte_buffer_reader.h> |
|
|
|
|
#include <grpc/event_engine/event_engine.h> |
|
|
|
|
#include <grpc/grpc.h> |
|
|
|
|
#include <grpc/impl/channel_arg_names.h> |
|
|
|
|
#include <grpc/impl/connectivity_state.h> |
|
|
|
@ -42,11 +43,13 @@ |
|
|
|
|
#include "src/core/lib/channel/channel_fwd.h" |
|
|
|
|
#include "src/core/lib/channel/channel_stack.h" |
|
|
|
|
#include "src/core/lib/config/core_configuration.h" |
|
|
|
|
#include "src/core/lib/event_engine/default_event_engine.h" |
|
|
|
|
#include "src/core/lib/gprpp/debug_location.h" |
|
|
|
|
#include "src/core/lib/gprpp/orphanable.h" |
|
|
|
|
#include "src/core/lib/gprpp/ref_counted_ptr.h" |
|
|
|
|
#include "src/core/lib/gprpp/time.h" |
|
|
|
|
#include "src/core/lib/iomgr/closure.h" |
|
|
|
|
#include "src/core/lib/iomgr/exec_ctx.h" |
|
|
|
|
#include "src/core/lib/iomgr/pollset_set.h" |
|
|
|
|
#include "src/core/lib/security/credentials/channel_creds_registry.h" |
|
|
|
|
#include "src/core/lib/security/credentials/credentials.h" |
|
|
|
@ -302,7 +305,14 @@ void GrpcXdsTransportFactory::GrpcXdsTransport::Orphan() { |
|
|
|
|
GPR_ASSERT(client_channel != nullptr); |
|
|
|
|
client_channel->RemoveConnectivityWatcher(watcher_); |
|
|
|
|
} |
|
|
|
|
Unref(); |
|
|
|
|
// Do an async hop before unreffing. This avoids a deadlock upon
|
|
|
|
|
// shutdown in the case where the xDS channel is itself an xDS channel
|
|
|
|
|
// (e.g., when using one control plane to find another control plane).
|
|
|
|
|
grpc_event_engine::experimental::GetDefaultEventEngine()->Run([this]() { |
|
|
|
|
ApplicationCallbackExecCtx application_exec_ctx; |
|
|
|
|
ExecCtx exec_ctx; |
|
|
|
|
Unref(); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
OrphanablePtr<XdsTransportFactory::XdsTransport::StreamingCall> |
|
|
|
|