From 2088b10b1fcce969c7d03fe4b2297442f1d02174 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Fri, 3 Aug 2018 06:43:03 +0900 Subject: `retrieve_connection_pool` return a pool, not a connection --- .../lib/active_record/connection_adapters/abstract/connection_pool.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb index c730584902..f721e91203 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb @@ -1011,8 +1011,8 @@ module ActiveRecord # Returns true if a connection that's accessible to this class has # already been opened. def connected?(spec_name) - conn = retrieve_connection_pool(spec_name) - conn && conn.connected? + pool = retrieve_connection_pool(spec_name) + pool && pool.connected? end # Remove the connection for this class. This will close the active -- cgit v1.2.3