Skip to content

Commit

Permalink
[client] Implement timeout in requests
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelHassine committed Sep 10, 2024
1 parent e0c3a8e commit c18977d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pycti/api/opencti_api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit c18977d

Please sign in to comment.