1
0
Fork 0

fixed an issue with the way std::chrono::duration is defaulted with respoect to units in different compilers

This commit is contained in:
Kaveh Vahedipour 2016-09-07 13:59:30 +02:00
parent 8032860791
commit 43125c2a10
1 changed files with 5 additions and 4 deletions

View File

@ -280,10 +280,11 @@ void Agent::sendAppendEntriesRPC() {
std::vector<log_t> unconfirmed = _state.get(last_confirmed);
index_t highest = unconfirmed.back().index;
if (highest == _lastHighest[followerId] &&
(long)(500.0e6 * _config.minPing()) >
(std::chrono::system_clock::now() - _lastSent[followerId])
.count()) {
std::chrono::duration<double> m =
std::chrono::system_clock::now() - _lastSent[followerId];
if (highest == _lastHighest[followerId]
&& 0.5 * _config.minPing() > m.count()) {
continue;
}