From cb3a5bd46525ae56959ec7ba4b53bc2ba0b4a1a3 Mon Sep 17 00:00:00 2001 From: Jack Gilmore <46202639+JackGilmore@users.noreply.github.com> Date: Thu, 23 May 2024 09:30:09 +0100 Subject: [PATCH] Handle ConnectionResetError --- tools/alive.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/alive.py b/tools/alive.py index 46f7bf7..133339e 100755 --- a/tools/alive.py +++ b/tools/alive.py @@ -84,6 +84,9 @@ def handle_error(row): except URLError as e: print(f"Got status code {e.reason} for {req.full_url}") handle_error(row) + except ConnectionResetError as e: + print(f"Got ConnectionResetError {e.errno } for {req.full_url}") + handle_error(row) # Add small wait so we're not hammering similar hosts time.sleep(5)