Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

just check in all connections

  • Loading branch information...
commit beff819a4d7060b7635410d2c4621be735033240 1 parent 884a040
Aaron Patterson tenderlove authored
8 activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
View
@@ -128,11 +128,9 @@ def connected?
# Disconnects all connections in the pool, and clears the pool.
def disconnect!
- @reserved_connections.each do |name,conn|
- checkin conn
- end
@reserved_connections = {}
@connections.each do |conn|
+ checkin conn
conn.disconnect!
end
@connections = []
@@ -140,11 +138,9 @@ def disconnect!
# Clears the cache which maps classes.
def clear_reloadable_connections!
- @reserved_connections.each do |name, conn|
- checkin conn
- end
@reserved_connections = {}
@connections.each do |conn|
+ checkin conn
conn.disconnect! if conn.requires_reloading?
end
@connections.delete_if do |conn|
Please sign in to comment.
Something went wrong with that request. Please try again.