Skip to content

Commit

Permalink
fix multi_cluster_management check timeout when repeat localhost in /…
Browse files Browse the repository at this point in the history
…etc/hosts
  • Loading branch information
cstarc1 committed Dec 12, 2023
1 parent dbdde11 commit a1c72cb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/backend/distributed/connection/connection_management.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a1c72cb

Please sign in to comment.