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

More robust conversion to seconds in logged BEP5 announcer message.

parent 029d30b8
......@@ -112,7 +112,8 @@ struct detail::Bep5AnnouncerImpl
// Alternatively, set a closer period but use a normal (instead of uniform) distribution.
auto sleep = debug ? random_timeout(2min, 4min) : random_timeout(5min, 12min);
_DEBUG("Waiting for ", (sleep.count()/1000.f), "s to announce infohash=", infohash);
_DEBUG( "Waiting for ", chrono::duration_cast<chrono::seconds>(sleep).count()
, "s to announce infohash=", infohash);
async_sleep(exec, sleep, cancel, yield);
}
......
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