From d67aa2e250d8caff29a1addc65eb5e30cc5a74ee Mon Sep 17 00:00:00 2001 From: Spencer McIntyre Date: Fri, 9 Feb 2024 16:31:06 -0500 Subject: [PATCH] Fix a bug where clean up was not being invoked --- lib/msf/core/session_compatibility.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/msf/core/session_compatibility.rb b/lib/msf/core/session_compatibility.rb index c57269f2a286..3ee14cb26443 100644 --- a/lib/msf/core/session_compatibility.rb +++ b/lib/msf/core/session_compatibility.rb @@ -74,7 +74,9 @@ def check_for_session_readiness(tries=6) # # Default cleanup handler does nothing # - def cleanup; end + def cleanup + super if defined?(super) + end # # Return the associated session or nil if there isn't one