Commit 6db80e43 authored by Ivan Vilata-i-Balaguer's avatar Ivan Vilata-i-Balaguer
Browse files

Merge branch 'upnp-broken-refresh'.

Fix missing `std::chrono::ceil` in some C++1z implementations.
parents e1e77905 a50cef7f
......@@ -135,7 +135,10 @@ private:
auto now = steady_clock::now();
auto buggy_refresh = *earlier_buggy_timeout + timeout_pause;
if (buggy_refresh < now) return seconds(0);
return ceil<seconds>(buggy_refresh - now);
return [] (auto d) { // std::chrono::ceil not in c++1z
auto t = duration_cast<seconds>(d);
return t + seconds(t < d ? 1 : 0);
}(buggy_refresh - now);
}
// Wait until a little before mappings would time out to refresh them.
auto round_elapsed = steady_clock::now() - round_begin;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment