aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi
diff options
context:
space:
mode:
authorGravatar Eric Gribkoff <ericgribkoff@google.com>2018-12-04 18:31:45 -0800
committerGravatar GitHub <noreply@github.com>2018-12-04 18:31:45 -0800
commit8998dfcb7a184f614a8a145b63f3325908c85a90 (patch)
tree197ec90198a132d88fda18a25b65179c9da8a65f /src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi
parent7d687234268081e213792348017829032e319eff (diff)
parente699c47c1e39a7174ee603ec3f3e6ad3de197bf4 (diff)
Merge pull request #17396 from ericgribkoff/creds_close_hang
credentials: call grpc_init/grpc_shutdown when created/destroyed
Diffstat (limited to 'src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi')
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi
index 034836833e..2f51be40ce 100644
--- a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi
@@ -61,6 +61,7 @@ cdef int _get_metadata(
cdef void _destroy(void *state) with gil:
cpython.Py_DECREF(<object>state)
+ grpc_shutdown()
cdef class MetadataPluginCallCredentials(CallCredentials):
@@ -76,6 +77,7 @@ cdef class MetadataPluginCallCredentials(CallCredentials):
c_metadata_plugin.state = <void *>self._metadata_plugin
c_metadata_plugin.type = self._name
cpython.Py_INCREF(self._metadata_plugin)
+ fork_handlers_and_grpc_init()
return grpc_metadata_credentials_create_from_plugin(c_metadata_plugin, NULL)