dbms: Server: Fixed race condition in ConnectionPoolWithFailover. [#METR-15331]

This commit is contained in:
Alexey Arno 2015-03-18 14:28:30 +03:00
parent 7196d9c987
commit b5f690dcd1

View File

@ -91,6 +91,8 @@ private:
void applyLoadBalancing(Settings * settings) void applyLoadBalancing(Settings * settings)
{ {
Poco::ScopedLock<Poco::FastMutex> lock(mutex);
LoadBalancing load_balancing = default_load_balancing; LoadBalancing load_balancing = default_load_balancing;
if (settings) if (settings)
load_balancing = settings->load_balancing; load_balancing = settings->load_balancing;