diff options
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb | 6 |
1 files changed, 3 insertions, 3 deletions
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 260d58b2e0..0b3971a0a6 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb @@ -231,11 +231,11 @@ module ActiveRecord @queue.wait(@timeout) - if(checked_out.size < @connections.size) + if(active_connections.size < @connections.size) next else clear_stale_cached_connections! - if @size == checked_out.size + if @size == active_connections.size raise ConnectionTimeoutError, "could not obtain a database connection#{" within #{@timeout} seconds" if @timeout}. The max pool size is currently #{@size}; consider increasing it." end end @@ -286,7 +286,7 @@ module ActiveRecord c end - def checked_out + def active_connections @connections.find_all { |c| c.in_use? } end end |