forked from premiere/premiere-libtorrent
assert fix
This commit is contained in:
parent
6fa3d37e83
commit
04a9dd77b5
|
@ -3185,6 +3185,8 @@ namespace libtorrent
|
|||
TORRENT_ASSERT(unique.size() == m_download_queue.size() + m_request_queue.size());
|
||||
if (m_peer_info)
|
||||
{
|
||||
TORRENT_ASSERT(m_peer_info->prev_amount_upload == 0);
|
||||
TORRENT_ASSERT(m_peer_info->prev_amount_download == 0);
|
||||
TORRENT_ASSERT(m_peer_info->connection == this
|
||||
|| m_peer_info->connection == 0);
|
||||
|
||||
|
|
|
@ -1206,6 +1206,8 @@ namespace libtorrent
|
|||
TORRENT_ASSERT(c.share_diff() < (std::numeric_limits<size_type>::max)());
|
||||
m_available_free_upload += c.share_diff();
|
||||
}
|
||||
TORRENT_ASSERT(p->prev_amount_upload == 0);
|
||||
TORRENT_ASSERT(p->prev_amount_download == 0);
|
||||
p->prev_amount_download += c.statistics().total_payload_download();
|
||||
p->prev_amount_upload += c.statistics().total_payload_upload();
|
||||
}
|
||||
|
|
|
@ -2311,6 +2311,10 @@ namespace libtorrent
|
|||
c->m_in_constructor = false;
|
||||
#endif
|
||||
|
||||
c->add_stat(peerinfo->prev_amount_download, peerinfo->prev_amount_upload);
|
||||
peerinfo->prev_amount_download = 0;
|
||||
peerinfo->prev_amount_upload = 0;
|
||||
|
||||
#ifndef TORRENT_DISABLE_EXTENSIONS
|
||||
for (extension_list_t::iterator i = m_extensions.begin()
|
||||
, end(m_extensions.end()); i != end; ++i)
|
||||
|
|
Loading…
Reference in New Issue