Fix bug related to poll timeout

This commit fixes a bug on setting polling timeout. The code
updated to comform to the comment that is already placed.
pull/642/head
Onder Kalaci 2016-07-12 11:48:55 +03:00
parent 0c540e741d
commit 56c0b0825f
1 changed files with 3 additions and 3 deletions

View File

@ -800,14 +800,14 @@ MultiClientRegisterWait(WaitInfo *waitInfo, TaskExecutionStatus executionStatus,
void
MultiClientWait(WaitInfo *waitInfo)
{
long sleepIntervalPerCycle = RemoteTaskCheckInterval * 1000L;
/*
* If we had a failure, we always want to sleep for a bit, to prevent
* flooding the other system, probably making the situation worse.
*/
if (waitInfo->haveFailedWaiter)
{
long sleepIntervalPerCycle = RemoteTaskCheckInterval * 1000L;
pg_usleep(sleepIntervalPerCycle);
return;
}
@ -828,7 +828,7 @@ MultiClientWait(WaitInfo *waitInfo)
* times as long.
*/
int rc = poll(waitInfo->pollfds, waitInfo->registeredWaiters,
sleepIntervalPerCycle * 10);
RemoteTaskCheckInterval * 10);
if (rc < 0)
{