diff --git a/include/libtorrent/torrent.hpp b/include/libtorrent/torrent.hpp index bbdbbd9eb..397e46230 100644 --- a/include/libtorrent/torrent.hpp +++ b/include/libtorrent/torrent.hpp @@ -600,6 +600,8 @@ namespace libtorrent // decreased in the piece_picker void remove_peer(peer_connection* p); + // cancel requests to this block from any peer we're + // connected to on this torrent void cancel_block(piece_block block); bool want_tick() const; diff --git a/src/disk_io_thread.cpp b/src/disk_io_thread.cpp index d3a86a4f8..fb7acbbdd 100644 --- a/src/disk_io_thread.cpp +++ b/src/disk_io_thread.cpp @@ -230,7 +230,7 @@ namespace libtorrent #endif } - // TODO: 3 it would be nice to have the number of threads be set dynamically + // TODO: 1 it would be nice to have the number of threads be set dynamically void disk_io_thread::set_num_threads(int i, bool wait) { TORRENT_ASSERT(m_magic == 0x1337); diff --git a/src/kademlia/routing_table.cpp b/src/kademlia/routing_table.cpp index f5ceb830b..cd768275c 100644 --- a/src/kademlia/routing_table.cpp +++ b/src/kademlia/routing_table.cpp @@ -881,7 +881,7 @@ void routing_table::split_bucket() if (b.size() > bucket_size_limit) { - // TODO: 3 move the lowest priority nodes to the replacement bucket + // TODO: 2 move the lowest priority nodes to the replacement bucket for (bucket_t::iterator i = b.begin() + bucket_size_limit , end(b.end()); i != end; ++i) { diff --git a/src/session_impl.cpp b/src/session_impl.cpp index 7e659ebc6..268ee7d30 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -5779,8 +5779,6 @@ retry: } } - // TODO: 3 If socket jobs could be higher level, to include RC4 encryption and decryption, - // we would offload the main thread even more void session_impl::post_socket_job(socket_job& j) { uintptr_t idx = 0; diff --git a/src/torrent.cpp b/src/torrent.cpp index 6d852ce16..74d5d51eb 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -1066,7 +1066,9 @@ namespace libtorrent } else { - // TODO: 3 if any other peer has a busy request to this block, we need to cancel it too + // if any other peer has a busy request to this block, we need + // to cancel it too + cancel_block(block_finished); if (has_picker()) picker().write_failed(block_finished);