mirror of https://github.com/citusdata/citus.git
Use correct index for ModifyWaitEvent in WaitForAllConnections
parent
d85a3952f5
commit
d6dadb1b25
|
@ -831,7 +831,6 @@ WaitForAllConnections(List *connectionList, bool raiseInterrupts)
|
||||||
}
|
}
|
||||||
|
|
||||||
connection = (MultiConnection *) event->user_data;
|
connection = (MultiConnection *) event->user_data;
|
||||||
connectionIndex = event->pos + pendingConnectionsStartIndex;
|
|
||||||
|
|
||||||
if (event->events & WL_SOCKET_WRITEABLE)
|
if (event->events & WL_SOCKET_WRITEABLE)
|
||||||
{
|
{
|
||||||
|
@ -844,7 +843,7 @@ WaitForAllConnections(List *connectionList, bool raiseInterrupts)
|
||||||
else if (sendStatus == 0)
|
else if (sendStatus == 0)
|
||||||
{
|
{
|
||||||
/* done writing, only wait for read events */
|
/* done writing, only wait for read events */
|
||||||
ModifyWaitEvent(waitEventSet, connectionIndex, WL_SOCKET_READABLE,
|
ModifyWaitEvent(waitEventSet, event->pos, WL_SOCKET_READABLE,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -866,6 +865,7 @@ WaitForAllConnections(List *connectionList, bool raiseInterrupts)
|
||||||
|
|
||||||
if (connectionIsReady)
|
if (connectionIsReady)
|
||||||
{
|
{
|
||||||
|
connectionIndex = event->pos + pendingConnectionsStartIndex;
|
||||||
connectionReady[connectionIndex] = true;
|
connectionReady[connectionIndex] = true;
|
||||||
rebuildWaitEventSet = true;
|
rebuildWaitEventSet = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue