From e771a3ebcee9a7c6c3efd08fa905cbe0591131b1 Mon Sep 17 00:00:00 2001 From: "Brandon C. Irizarry" Date: Thu, 16 Apr 2026 16:36:52 -0400 Subject: feat: add a timeout for sites that don't respond This should diminish the urge for reaching for Ctrl+C. --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main.py') diff --git a/main.py b/main.py index 80dcce7..d874d42 100644 --- a/main.py +++ b/main.py @@ -44,7 +44,7 @@ async def ping(urls: list[str], max_concurrency=None) -> None: """ - async with aiohttp.ClientSession(max_field_size=8190 * 2) as session: + async with aiohttp.ClientSession(max_field_size=8190 * 2, timeout=1.0) as session: for url in urls: try: async with session.get(url) as response: -- cgit v1.2.3