diff options
author | Edgars Beigarts <edgars.beigarts@tieto.com> | 2010-06-22 11:48:11 +0300 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-06-22 21:48:43 +0200 |
commit | 62c4e4d3856b38ee9869f4ad6342e712788c8635 (patch) | |
tree | 76dd8517ea2dbd4ddedb0772a9e157efa35d1280 /activerecord/lib/active_record/connection_adapters/abstract | |
parent | c0fc084e937ff045a75227cee52c801589517435 (diff) | |
download | rails-62c4e4d3856b38ee9869f4ad6342e712788c8635.tar.gz rails-62c4e4d3856b38ee9869f4ad6342e712788c8635.tar.bz2 rails-62c4e4d3856b38ee9869f4ad6342e712788c8635.zip |
Fix connection reloading in development mode. [#4929 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb | 4 |
1 files changed, 3 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 979ed52f4a..c2d79a421d 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb @@ -144,7 +144,9 @@ module ActiveRecord @connections.each do |conn| conn.disconnect! if conn.requires_reloading? end - @connections = [] + @connections.delete_if do |conn| + conn.requires_reloading? + end end # Verify active connections and remove and disconnect connections |