Skip to content

Commit

Permalink
Catch ClientConnectorError in _is_url_available (#8091)
Browse files Browse the repository at this point in the history
  • Loading branch information
egbertbouman authored Aug 15, 2024
2 parents fd56b6c + 3e133ab commit db74f82
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ lint.ignore = [
"ARG001",
"ARG002",
"ARG005",
"ASYNC109",
"BLE001",
"COM812",
"COM819",
Expand Down
2 changes: 1 addition & 1 deletion src/tribler/core/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ async def _is_url_available(url: str, timeout: int=1) -> bool:
try:
async with session.get(url, timeout=timeout):
return True
except asyncio.TimeoutError:
except (asyncio.TimeoutError, aiohttp.client_exceptions.ClientConnectorError):
return False


Expand Down

0 comments on commit db74f82

Please sign in to comment.