Skip to content

Commit

Permalink
appease boost 1.67.0 (#2867)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinushey committed May 29, 2018
1 parent b08a4a3 commit 85896f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cpp/core/ExponentialBackoff.cpp
Expand Up @@ -68,7 +68,8 @@ bool ExponentialBackoff::next()
return true;
}

boost::posix_time::milliseconds nextWait(initialWait_.total_milliseconds() * std::pow(2, totalNumTries_));
int factor = std::pow(2.0, totalNumTries_);
boost::posix_time::milliseconds nextWait(initialWait_.total_milliseconds() * factor);
boost::posix_time::milliseconds timeout = (nextWait > maxWait_) ? maxWait_ : nextWait;

if (maxNumRetries_ == 0 && timeout == maxWait_)
Expand Down

0 comments on commit 85896f3

Please sign in to comment.