Skip to content

Commit 397746e

Browse files
authored
Merge pull request #1322 from marc-vdm/link_fetch_timeout
add timeout to link fetching
2 parents 4ad6ebc + 666d429 commit 397746e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

activity_browser/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def safe_link_fetch(url: str) -> Tuple[object, object]:
5353
object: response if no error, otherwise None
5454
"""
5555
try:
56-
response = requests.get(url) # retrieve the page from the URL
56+
response = requests.get(url, timeout=2) # retrieve the page from the URL
5757
response.raise_for_status()
5858
except Exception as error:
5959
return (None, error)

0 commit comments

Comments
 (0)