diff options
author | Nick Sieger <nick@nicksieger.com> | 2008-11-08 03:49:25 +0530 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-11-08 03:49:54 +0530 |
commit | 529c2716992490a6eab55486788ca0d35c17e60b (patch) | |
tree | af3f5ebe0568b167f33c4783b084415dbfa51b73 /activerecord | |
parent | d3ec1d3c22904c8801945b56956466f8ead9f3c1 (diff) | |
download | rails-529c2716992490a6eab55486788ca0d35c17e60b.tar.gz rails-529c2716992490a6eab55486788ca0d35c17e60b.tar.bz2 rails-529c2716992490a6eab55486788ca0d35c17e60b.zip |
Simplify dispatcher callbacks to eliminate unnecessary stale thread purging. [Nick Sieger, Pratik Naik]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb | 5 |
1 files changed, 1 insertions, 4 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 54a17e20a9..cf760e334e 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb @@ -292,10 +292,7 @@ module ActiveRecord # and also returns connections to the pool cached by threads that are no # longer alive. def clear_active_connections! - @connection_pools.each_value do |pool| - pool.release_connection - pool.clear_stale_cached_connections! - end + @connection_pools.each_value {|pool| pool.release_connection } end # Clears the cache which maps classes |