diff options
| author | Brandon C. Irizarry <brandon.irizarry@gmail.com> | 2026-04-16 16:36:52 -0400 |
|---|---|---|
| committer | Brandon C. Irizarry <brandon.irizarry@gmail.com> | 2026-04-16 16:36:52 -0400 |
| commit | e771a3ebcee9a7c6c3efd08fa905cbe0591131b1 (patch) | |
| tree | 8f7c3873883964f891cb0b336ef6f4d1e2940838 | |
| parent | 172bccd05779240d6d6cd087a1c19216f0a5e225 (diff) | |
feat: add a timeout for sites that don't respond
This should diminish the urge for reaching for Ctrl+C.
| -rw-r--r-- | main.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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: |
