Skip to content

Commit

Permalink
Cancel the requests in streaming case by default when closing the con…
Browse files Browse the repository at this point in the history
…nection
  • Loading branch information
Tabrizian committed Sep 10, 2024
1 parent cb9ba08 commit 743306b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/python/library/tritonclient/grpc/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 743306b

Please sign in to comment.