fix multi_cluster_management check timeout when repeat localhost in /etc/hosts

pull/7377/head
chuhx43211 2023-12-12 13:16:57 +08:00 committed by LightDB Enterprise Postgres
parent 6801a1ed1e
commit 89ae723759
1 changed files with 8 additions and 1 deletions

View File

@ -1046,8 +1046,15 @@ FinishConnectionListEstablishment(List *multiConnectionList)
continue;
}
bool beforePollSocket = PQsocket(connectionState->connection->pgConn);
bool connectionStateChanged = MultiConnectionStatePoll(connectionState);
if (beforePollSocket != PQsocket(connectionState->connection->pgConn))
{
/* rebuild the wait events if MultiConnectionStatePoll() changed the socket */
waitEventSetRebuild = true;
}
if (connectionStateChanged)
{
if (connectionState->phase != MULTI_CONNECTION_PHASE_CONNECTING)