Skip to content

Commit 25a3131

Browse files
jimyx17martinmr
authored andcommitted
Free GRPC resources on stub close (#69)
Lastest versions of GRPC does not include the shutdown and destroy channel on _del_ call. (grpc/grpc#12531).
1 parent 0fe85f6 commit 25a3131

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pydgraph/client_stub.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,9 @@ def check_version(self, check, timeout=None, metadata=None,
7070

7171
def close(self):
7272
"""Deletes channel and stub."""
73+
try:
74+
self.channel.close()
75+
except:
76+
pass
7377
del self.channel
7478
del self.stub

0 commit comments

Comments
 (0)