From c6633a3086e2ddcd833014dc5237bbade5ca10d6 Mon Sep 17 00:00:00 2001 From: adfoster-r7 Date: Tue, 19 Nov 2024 17:35:31 +0000 Subject: [PATCH] Remove connection pool patch --- .github/workflows/command_shell_acceptance.yml | 2 +- .github/workflows/shared_meterpreter_acceptance.yml | 2 +- lib/msf/core/thread_manager.rb | 10 ---------- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/.github/workflows/command_shell_acceptance.yml b/.github/workflows/command_shell_acceptance.yml index 62da721a0bec6..d103f4874b816 100644 --- a/.github/workflows/command_shell_acceptance.yml +++ b/.github/workflows/command_shell_acceptance.yml @@ -60,7 +60,7 @@ jobs: # Run all test individually, note there is a separate final job for aggregating the test results test: strategy: - fail-fast: false + fail-fast: true matrix: os: - windows-2019 diff --git a/.github/workflows/shared_meterpreter_acceptance.yml b/.github/workflows/shared_meterpreter_acceptance.yml index e595308e2652d..f8a31a44d3b6b 100644 --- a/.github/workflows/shared_meterpreter_acceptance.yml +++ b/.github/workflows/shared_meterpreter_acceptance.yml @@ -63,7 +63,7 @@ jobs: if: always() && (needs.java_meterpreter_compilation.result == 'success' || needs.java_meterpreter_compilation.result == 'skipped') strategy: - fail-fast: false + fail-fast: true matrix: os: - macos-13 diff --git a/lib/msf/core/thread_manager.rb b/lib/msf/core/thread_manager.rb index 7fe59f501805e..9bc89ae37ca6f 100644 --- a/lib/msf/core/thread_manager.rb +++ b/lib/msf/core/thread_manager.rb @@ -111,16 +111,6 @@ def spawn(name, crit, *args, &block) error: e ) raise e - ensure - if framework.db && framework.db.active && framework.db.is_local? - # NOTE: despite the Deprecation Warning's advice, this should *NOT* - # be ApplicationRecord.connection.close which causes unrelated - # threads to raise ActiveRecord::StatementInvalid exceptions at - # some point in the future, presumably due to the pool manager - # believing that the connection is still usable and handing it out - # to another thread. - ::ApplicationRecord.connection_pool.release_connection - end end end else