fix timestamp arithmetic overflow

This commit is contained in:
arvidn 2016-07-30 00:38:17 -04:00
parent c1ade2b75f
commit 0126f6f2c6
1 changed files with 1 additions and 1 deletions

View File

@ -727,7 +727,7 @@ routing_table::add_node_status_t routing_table::add_node_impl(node_entry e)
auto now = aux::time_now();
for (auto& node : existing_bucket->live_nodes)
{
if (now - node.last_queried > minutes(5))
if (node.last_queried + minutes(5) < now)
node.last_queried = min_time();
}