Commit 03f1abfc authored by Lin Jen-Shin's avatar Lin Jen-Shin

Only ensure against yield so that pool should be available

Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9192#note_23293693
parent 136dc794
......@@ -72,11 +72,12 @@ module Gitlab
def self.with_connection_pool(pool_size)
pool = create_connection_pool(pool_size)
begin
yield(pool)
ensure
pool.disconnect!
end
end
def self.create_connection_pool(pool_size)
# See activerecord-4.2.7.1/lib/active_record/connection_adapters/connection_specification.rb
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment