Skip to content

Commit

Permalink
Fix review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Junchao-Mellanox committed Oct 9, 2022
1 parent c961e43 commit 0f69104
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions common/restart_waiter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,12 @@ bool RestartWaiter::doWait(DBConnector &stateDb,
int delay = static_cast<int>(
std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count());

selectTimeout -= delay;
if (selectTimeout <= 0)
if (delay >= static_cast<int>(maxWaitSec) * 1000)
{
return false;
}

selectTimeout -= delay;
}
}

Expand Down

0 comments on commit 0f69104

Please sign in to comment.