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

Avoid printing random core data when announcement is cancelled.

By copying the key which may become trashed on cancellation (when debugging).
parent 06833364
......@@ -311,10 +311,11 @@ struct Announcer::Loop {
}
sys::error_code ec;
auto e_key{ll.debug() ? e.key : ""}; // cancellation trashes the key
dht->tracker_announce(e.infohash, boost::none, cancel, yield[ec]);
if (ll.debug()) {
cerr << "Announcer: Announcing ended " << e.key << " ec:" << ec.message() << "\n";
cerr << "Announcer: Announcing ended " << e_key << " ec:" << ec.message() << "\n";
}
return or_throw(yield, ec);
......
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