Skip to content

Commit

Permalink
Catch ClientResponseError when checking running API
Browse files Browse the repository at this point in the history
  • Loading branch information
qstokkink committed Jan 29, 2025
1 parent 4d7cd97 commit 56a25ef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tribler/core/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ async def _is_url_available(url: str, timeout: int=1) -> bool:
try:
async with session.get(url, timeout=timeout):
return True
except (asyncio.TimeoutError, aiohttp.client_exceptions.ClientConnectorError):
except (asyncio.TimeoutError, aiohttp.client_exceptions.ClientConnectorError,
aiohttp.client_exceptions.ClientResponseError):
return False


Expand Down

0 comments on commit 56a25ef

Please sign in to comment.