Make FindAvailableConnection() more strict

With adaptive connection management, we might have some connections
which are not fully initialized. Those connections should not be
qualified as available.
pull/4055/head
Onder Kalaci 2020-07-22 11:19:31 +02:00
parent 20a46f8f57
commit a2f53dff74
1 changed files with 9 additions and 0 deletions

View File

@ -450,6 +450,15 @@ FindAvailableConnection(dlist_head *connections, uint32 flags)
continue;
}
if (connection->initilizationState != POOL_STATE_INITIALIZED)
{
/*
* If the connection has not been initialized, it should not be
* considered as available.
*/
continue;
}
return connection;
}