mirror of
https://github.com/simon987/od-database.git
synced 2025-04-19 10:26:44 +00:00
Re-added timeout that was accidentally deleted
This commit is contained in:
parent
1283cc9599
commit
e6175c84c9
@ -92,7 +92,7 @@ class HttpDirectory(RemoteDirectory):
|
||||
retries = HttpDirectory.MAX_RETRIES
|
||||
while retries > 0:
|
||||
try:
|
||||
r = self.session.get(url)
|
||||
r = self.session.get(url, timeout=40)
|
||||
return r.content, r.encoding
|
||||
except RequestException:
|
||||
retries -= 1
|
||||
@ -134,7 +134,7 @@ class HttpDirectory(RemoteDirectory):
|
||||
retries = HttpDirectory.MAX_RETRIES
|
||||
while retries > 0:
|
||||
try:
|
||||
r = self.session.head(url, allow_redirects=False, timeout=50)
|
||||
r = self.session.head(url, allow_redirects=False, timeout=40)
|
||||
|
||||
stripped_url = url[len(self.base_url) - 1:]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user