Skip to content

Commit

Permalink
Add timeouts for requests
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremiah-k committed Nov 15, 2024
1 parent d43c869 commit 1592e2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def send_ntfy_notification(message, title=None):

# Function to get the latest releases and sort by date
def get_latest_releases(url, scan_count=10):
response = requests.get(url)
response = requests.get(url, timeout=10)
response.raise_for_status()
releases = response.json()
# Sort releases by published date, descending order
Expand Down
2 changes: 1 addition & 1 deletion app/menu_firmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

def fetch_firmware_assets():
firmware_releases_url = "https://api.github.com/repos/meshtastic/firmware/releases"
response = requests.get(firmware_releases_url)
response = requests.get(firmware_releases_url, timeout=10)
response.raise_for_status()
releases = response.json()
# Get the latest release
Expand Down

0 comments on commit 1592e2b

Please sign in to comment.