lt sync 2744
This commit is contained in:
parent
a449610e15
commit
7ed2d7c87a
|
@ -636,10 +636,11 @@ namespace libtorrent
|
|||
TORRENT_ASSERT(j.buffer_size <= m_block_size);
|
||||
mutex_t::scoped_lock l(m_queue_mutex);
|
||||
#ifndef NDEBUG
|
||||
mutex_t::scoped_lock l2(m_piece_mutex);
|
||||
if (j.action == disk_io_job::write)
|
||||
{
|
||||
cache_t::iterator p
|
||||
= find_cached_piece(m_pieces, j, l);
|
||||
= find_cached_piece(m_pieces, j, l2);
|
||||
if (p != m_pieces.end())
|
||||
{
|
||||
int block = j.offset / m_block_size;
|
||||
|
|
|
@ -245,7 +245,7 @@ namespace libtorrent
|
|||
std::string error_str("invalid bencoding of tracker response: \"");
|
||||
for (char const* i = data, *end(data + size); i != end; ++i)
|
||||
{
|
||||
if (std::isprint(*i)) error_str += *i;
|
||||
if (*i >= ' ' && *i <= '~') error_str += *i;
|
||||
else error_str += "0x" + boost::lexical_cast<std::string>((unsigned int)*i) + " ";
|
||||
}
|
||||
error_str += "\"";
|
||||
|
|
|
@ -1136,7 +1136,8 @@ namespace aux {
|
|||
int free_slots = m_half_open.free_slots();
|
||||
if (!m_torrents.empty()
|
||||
&& free_slots > -m_half_open.limit()
|
||||
&& num_connections() < m_max_connections)
|
||||
&& num_connections() < m_max_connections
|
||||
&& !m_abort)
|
||||
{
|
||||
// this is the maximum number of connections we will
|
||||
// attempt this tick
|
||||
|
|
|
@ -58,6 +58,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#include "libtorrent/config.hpp"
|
||||
#include "libtorrent/storage.hpp"
|
||||
#include "libtorrent/torrent.hpp"
|
||||
#include "libtorrent/hasher.hpp"
|
||||
|
|
|
@ -3053,7 +3053,8 @@ namespace libtorrent
|
|||
{
|
||||
session_impl::mutex_t::scoped_lock l(m_ses.m_mutex);
|
||||
|
||||
INVARIANT_CHECK;
|
||||
// doesn't work with the m_paused -> m_num_peers == 0 condition
|
||||
// INVARIANT_CHECK;
|
||||
|
||||
while (!m_connections.empty())
|
||||
{
|
||||
|
@ -3500,6 +3501,8 @@ namespace libtorrent
|
|||
{
|
||||
session_impl::mutex_t::scoped_lock l(m_ses.m_mutex);
|
||||
|
||||
if (is_paused()) TORRENT_ASSERT(num_peers() == 0);
|
||||
|
||||
if (!m_ses.m_queued_for_checking.empty())
|
||||
{
|
||||
// if there are torrents waiting to be checked
|
||||
|
|
|
@ -111,6 +111,7 @@ void udp_socket::on_read(udp::socket* s, error_code const& e, std::size_t bytes_
|
|||
s->async_receive_from(asio::buffer(m_v6_buf, sizeof(m_v6_buf))
|
||||
, m_v6_ep, boost::bind(&udp_socket::on_read, this, s, _1, _2));
|
||||
|
||||
++m_outstanding;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue