Skip to content

Commit ffe8e6d

Browse files
authored
core_banned_functions: use internal version of grpc_channel_destroy() inside C-core (#32495)
1 parent b3d6800 commit ffe8e6d

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1531,7 +1531,7 @@ void GrpcLb::ShutdownLocked() {
15311531
GPR_ASSERT(child_channelz_node != nullptr);
15321532
parent_channelz_node_->RemoveChildChannel(child_channelz_node->uuid());
15331533
}
1534-
grpc_channel_destroy(lb_channel_);
1534+
grpc_channel_destroy_internal(lb_channel_);
15351535
lb_channel_ = nullptr;
15361536
}
15371537
}

src/core/ext/filters/client_channel/lb_policy/rls/rls.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1631,7 +1631,7 @@ void RlsLb::RlsChannel::Orphan() {
16311631
client_channel->RemoveConnectivityWatcher(watcher_);
16321632
watcher_ = nullptr;
16331633
}
1634-
grpc_channel_destroy(channel_);
1634+
grpc_channel_destroy_internal(channel_);
16351635
}
16361636
Unref(DEBUG_LOCATION, "Orphan");
16371637
}

src/core/ext/xds/xds_transport_grpc.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ GrpcXdsTransportFactory::GrpcXdsTransport::GrpcXdsTransport(
291291
}
292292

293293
GrpcXdsTransportFactory::GrpcXdsTransport::~GrpcXdsTransport() {
294-
grpc_channel_destroy(channel_);
294+
grpc_channel_destroy_internal(channel_);
295295
}
296296

297297
void GrpcXdsTransportFactory::GrpcXdsTransport::Orphan() {

tools/run_tests/sanity/core_banned_functions.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@
4747
'src/core/lib/slice/slice.cc', 'src/core/lib/slice/slice.h'
4848
],
4949
'grpc_call_cancel(': ['src/core/lib/surface/call.cc'],
50+
'grpc_channel_destroy(': [
51+
'src/core/lib/surface/channel.cc',
52+
'src/core/tsi/alts/handshaker/alts_shared_resource.cc',
53+
],
5054
'grpc_closure_create(': [
5155
'src/core/lib/iomgr/closure.cc', 'src/core/lib/iomgr/closure.h'
5256
],

0 commit comments

Comments
 (0)