Skip to content

Commit

Permalink
Add timeout to request.head
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytrotkk committed May 16, 2024
1 parent 622d42f commit 101d507
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion proxy/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def url_ok(url) -> bool:
try:
r = requests.head(url, timeout=10)
return bool(r.status_code)
except requests.exceptions.ConnectionError:
except requests.exceptions.RequestException:
return False


Expand Down

0 comments on commit 101d507

Please sign in to comment.