提交 969339bd 编写于 作者: M Matthew Draper

Clear available connections immediately

It'll be re-cleared when it's rebuilt in with_new_connections_blocked's
ensure, but we still need to clear it inside this synchronize -- we've
disconnected connections that may be available in the queue, and while
other threads are not allowed to make *new* connections, they are still
allowed to take existing ones from there.

This was incorrectly removed in d314646c.
上级 5921043f
......@@ -422,6 +422,7 @@ def disconnect(raise_on_acquisition_timeout = true)
conn.disconnect!
end
@connections = []
@available.clear
end
end
end
......@@ -454,6 +455,7 @@ def clear_reloadable_connections(raise_on_acquisition_timeout = true)
conn.disconnect! if conn.requires_reloading?
end
@connections.delete_if(&:requires_reloading?)
@available.clear
end
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册