From 6d37c638e7eaa3daa48fe0408016be625bc22ef6 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 15 Jan 2007 22:12:40 +0000 Subject: Made sure that connections are only removed for SQLite git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5955 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../connection_adapters/abstract/connection_specification.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'activerecord/lib/active_record/connection_adapters/abstract') diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb index 31c288b932..fbdbea499b 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb @@ -90,8 +90,10 @@ module ActiveRecord # Clears the cache which maps classes def clear_reloadable_connections! @@active_connections.each do |name, conn| - conn.disconnect! if conn.supports_reloading? - @@active_connections.delete(name) + if conn.requires_reloading? + conn.disconnect! + @@active_connections.delete(name) + end end end -- cgit v1.2.3