From 111399e4319a7297c9edd075725048c5638dbceb Mon Sep 17 00:00:00 2001 From: Joe Testa Date: Thu, 9 Jul 2026 18:55:12 -0400 Subject: [PATCH] Fixed a perhaps rare crash during rate testing. (#367) --- README.md | 3 +++ src/ssh_audit/dheat.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2762b48..4b60f9e 100644 --- a/README.md +++ b/README.md @@ -252,6 +252,9 @@ For convenience, a web front-end on top of the command-line tool is available at ## ChangeLog +### v3.9.1-dev + - Fixed a perhaps rare crash when performing connection rate tests during standard audits. + ### v3.9.0 (2026-07-04) - BIG THANKS to [realmiwi](https://github.com/realmiwi) for being the project's *very first sponsor!!* - Added support for Python 3.14. diff --git a/src/ssh_audit/dheat.py b/src/ssh_audit/dheat.py index 82cf060..77ad437 100644 --- a/src/ssh_audit/dheat.py +++ b/src/ssh_audit/dheat.py @@ -324,7 +324,8 @@ class DHEat: except OSError: pass - del socket_dict[s] + if s in socket_dict: + del socket_dict[s] # Check if this platform has socket.AF_UNIX. Windows does not. has_af_unix = hasattr(socket, 'AF_UNIX')