diff --git a/include/libtorrent/web_peer_connection.hpp b/include/libtorrent/web_peer_connection.hpp index 4bf98f19f..876bd620f 100644 --- a/include/libtorrent/web_peer_connection.hpp +++ b/include/libtorrent/web_peer_connection.hpp @@ -124,6 +124,7 @@ namespace libtorrent // that are received in more than one HTTP response // TODO: if we make this be a disk_buffer_holder instead // we would save a copy sometimes + // use allocate_disk_receive_buffer and release_disk_receive_buffer std::vector m_piece; // the number of bytes received in the current HTTP diff --git a/src/connection_queue.cpp b/src/connection_queue.cpp index 3a4caaa26..2f2fab9a0 100644 --- a/src/connection_queue.cpp +++ b/src/connection_queue.cpp @@ -294,7 +294,7 @@ namespace libtorrent --m_num_connecting; continue; } - if (i->expires < next_expire) + if (i->connecting && i->expires < next_expire) next_expire = i->expires; ++i; }