Skip to content

Commit

Permalink
Rename checked_out to more descriptive active_connections
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Nov 29, 2011
1 parent b72b477 commit 5725e39
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -231,11 +231,11 @@ def checkout

@queue.wait(@timeout)

if(checked_out.size < @connections.size)
if(active_connections.size < @connections.size)
next
else
clear_stale_cached_connections!
if @size == checked_out.size
if @size == active_connections.size
raise ConnectionTimeoutError, "could not obtain a database connection#{" within #{@timeout} seconds" if @timeout}. The max pool size is currently #{@size}; consider increasing it."
end
end
Expand Down Expand Up @@ -286,7 +286,7 @@ def checkout_and_verify(c)
c
end

def checked_out
def active_connections
@connections.find_all { |c| c.in_use? }
end
end
Expand Down

0 comments on commit 5725e39

Please sign in to comment.