fix for restart hold behavior in domain-server

This commit is contained in:
Stephen Birarda 2013-10-02 10:53:54 -07:00
parent bac16cc5cf
commit a771a5de07

View file

@ -345,7 +345,7 @@ void DomainServer::possiblyAddStaticAssignmentsBackToQueueAfterRestart(timeval*
// throw into the assignment queue // throw into the assignment queue
const uint64_t RESTART_HOLD_TIME_USECS = 5 * 1000 * 1000; const uint64_t RESTART_HOLD_TIME_USECS = 5 * 1000 * 1000;
if (usecTimestampNow() - usecTimestamp(startTime) > RESTART_HOLD_TIME_USECS) { if (!_hasCompletedRestartHold && usecTimestampNow() - usecTimestamp(startTime) > RESTART_HOLD_TIME_USECS) {
_hasCompletedRestartHold = true; _hasCompletedRestartHold = true;
// pull anything in the static assignment file that isn't spoken for and add to the assignment queue // pull anything in the static assignment file that isn't spoken for and add to the assignment queue
@ -530,7 +530,7 @@ int DomainServer::run() {
qDebug("Received a request for assignment.\n"); qDebug("Received a request for assignment.\n");
if (_hasCompletedRestartHold) { if (!_hasCompletedRestartHold) {
possiblyAddStaticAssignmentsBackToQueueAfterRestart(&startTime); possiblyAddStaticAssignmentsBackToQueueAfterRestart(&startTime);
} }