diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-12-30 14:31:30 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-12-30 14:31:30 -0800 |
commit | b1ac881433b95498e3b63b2686d1e31f1bdb93fc (patch) | |
tree | c1ee45de23f738fdfc7cbaa41cf647cabcb58628 /activerecord/lib | |
parent | 86729eb733ce67818f079744fdea5ec63e25259a (diff) | |
download | rails-b1ac881433b95498e3b63b2686d1e31f1bdb93fc.tar.gz rails-b1ac881433b95498e3b63b2686d1e31f1bdb93fc.tar.bz2 rails-b1ac881433b95498e3b63b2686d1e31f1bdb93fc.zip |
connections are only removed if they are inactve
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb | 2 |
1 files changed, 1 insertions, 1 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 3f3b98ace0..4173b3ebe6 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb @@ -239,7 +239,7 @@ module ActiveRecord synchronize do stale = Time.now - @timeout connections.dup.each do |conn| - remove conn if conn.in_use? && stale > conn.last_use + remove conn if conn.in_use? && stale > conn.last_use && !conn.active? end end end |