Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jenny Ryan
ouinet
Commits
ed49cda0
Commit
ed49cda0
authored
Jan 08, 2021
by
Ivan Vilata-i-Balaguer
Browse files
More robust conversion to seconds in logged BEP5 announcer message.
parent
029d30b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/bittorrent/bep5_announcer.cpp
View file @
ed49cda0
...
...
@@ -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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment