Skip to content

Commit

Permalink
Merge pull request #1322 from marc-vdm/link_fetch_timeout
Browse files Browse the repository at this point in the history
add timeout to link fetching
  • Loading branch information
mrvisscher authored Jul 9, 2024
2 parents 4ad6ebc + 666d429 commit 397746e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activity_browser/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def safe_link_fetch(url: str) -> Tuple[object, object]:
object: response if no error, otherwise None
"""
try:
response = requests.get(url) # retrieve the page from the URL
response = requests.get(url, timeout=2) # retrieve the page from the URL
response.raise_for_status()
except Exception as error:
return (None, error)
Expand Down

0 comments on commit 397746e

Please sign in to comment.