From 743306bdaaf29971d217d42f4b620e6569ebb333 Mon Sep 17 00:00:00 2001 From: Iman Tabrizian Date: Tue, 10 Sep 2024 10:49:23 -0400 Subject: [PATCH] Cancel the requests in streaming case by default when closing the connection --- src/python/library/tritonclient/grpc/_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/python/library/tritonclient/grpc/_client.py b/src/python/library/tritonclient/grpc/_client.py index 1c68115c4..c66ee9b09 100755 --- a/src/python/library/tritonclient/grpc/_client.py +++ b/src/python/library/tritonclient/grpc/_client.py @@ -256,12 +256,12 @@ def __exit__(self, type, value, traceback): def __del__(self): self.close() - def close(self): + def close(self, cancel_requests=True): """Close the client. Any future calls to server will result in an Error. """ - self.stop_stream() + self.stop_stream(cancel_requests) self._channel.close() def is_server_live(self, headers=None, client_timeout=None):