diff --git a/pydgraph/client_stub.py b/pydgraph/client_stub.py index 41a8e65..08ac853 100644 --- a/pydgraph/client_stub.py +++ b/pydgraph/client_stub.py @@ -70,5 +70,9 @@ def check_version(self, check, timeout=None, metadata=None, def close(self): """Deletes channel and stub.""" + try: + self.channel.close() + except: + pass del self.channel del self.stub