Merge pull request #768 from disconn3ct/fix/381-login-timeout

Increase login timeout to 10s
This commit is contained in:
Odd Stråbø 2023-09-22 00:51:39 +02:00 committed by GitHub
commit 18b785c68b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -432,7 +432,7 @@ class API(object):
try:
LOG.info("Trying to login to %s/%s as %s" % (server_url, path, username))
response = self.send_request(server_url, path, method="post", headers=headers, data=json.dumps(auth_data))
response = self.send_request(server_url, path, method="post", timeout=10, headers=headers, data=json.dumps(auth_data))
if response.status_code == 200:
return response.json()