Skip to content

Commit

Permalink
Force aiohttp to not use a dns cache
Browse files Browse the repository at this point in the history
  • Loading branch information
suchmememanyskill committed May 24, 2024
1 parent a183bbd commit a911152
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ async def fetch_class_mappings(css_translations_path : str, loader : Loader):
Log(f"Fetching CSS mappings from {css_translations_url}")

try:
async with aiohttp.ClientSession(connector=aiohttp.TCPConnector(verify_ssl=False), timeout=aiohttp.ClientTimeout(total=2)) as session:
async with aiohttp.ClientSession(connector=aiohttp.TCPConnector(verify_ssl=False, use_dns_cache=False), timeout=aiohttp.ClientTimeout(total=5)) as session:
async with session.get(css_translations_url) as response:
if response.status == 200:
text = await response.text()
Expand Down

0 comments on commit a911152

Please sign in to comment.