Permalink
Browse files

Synchronize around deleting from the reserved connections hash.

Fixes #7955
  • Loading branch information...
1 parent b3485b7 commit d92e66f14c137e112e1e7a714ddcb9dd9f7aec3e @tenderlove tenderlove committed Oct 15, 2012
@@ -1,5 +1,8 @@
## Rails 3.2.9 (unreleased)
+* Synchronize around deleting from the reserved connections hash.
+ Fixes #7955
+
* PostgreSQL adapter correctly fetches default values when using
multiple schemas and domains in a db. Fixes #7914
@@ -116,7 +116,7 @@ def active_connection?
# #release_connection releases the connection-thread association
# and returns the connection to the pool.
def release_connection(with_id = current_connection_id)
- conn = @reserved_connections.delete(with_id)
+ conn = synchronize { @reserved_connections.delete(with_id) }
checkin conn if conn
end

0 comments on commit d92e66f

Please sign in to comment.