Commit ef9e94c4 authored by Titouan Soulard's avatar Titouan Soulard

erp5_jio_connector: add timeout for connection to API

parent f88843bd
Pipeline #37488 passed with stage
in 0 seconds
......@@ -53,7 +53,7 @@ class JioApiConnector(XMLObject):
def _sendToApi(self, path, request_dict):
get_url = self.getUrlString() + path
user_credentials = (self.getUserId(), self.getPassword())
r = requests.post(get_url, json=request_dict, auth=user_credentials)
r = requests.post(get_url, json=request_dict, auth=user_credentials, timeout=5)
# Return response when status code is as expected
if r.status_code in [200, 201]:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment