From c18977db925bd0f959b12db59bdda64d67fb1c4a Mon Sep 17 00:00:00 2001 From: Samuel Hassine Date: Tue, 10 Sep 2024 10:22:35 +0200 Subject: [PATCH] [client] Implement timeout in requests --- pycti/api/opencti_api_client.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pycti/api/opencti_api_client.py b/pycti/api/opencti_api_client.py index 7140d496..ffdc0eb9 100644 --- a/pycti/api/opencti_api_client.py +++ b/pycti/api/opencti_api_client.py @@ -330,6 +330,7 @@ def query(self, query, variables=None): verify=self.ssl_verify, cert=self.cert, proxies=self.proxies, + timeout=300, ) # If no else: @@ -340,6 +341,7 @@ def query(self, query, variables=None): verify=self.ssl_verify, cert=self.cert, proxies=self.proxies, + timeout=300, ) # Build response if r.status_code == 200: @@ -383,6 +385,7 @@ def fetch_opencti_file(self, fetch_uri, binary=False, serialize=False): verify=self.ssl_verify, cert=self.cert, proxies=self.proxies, + timeout=300, ) if binary: if serialize: