mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
lt sync 2836
This commit is contained in:
parent
3405450256
commit
79209daf94
2 changed files with 13 additions and 1 deletions
|
@ -1158,6 +1158,18 @@ namespace libtorrent
|
||||||
boost::shared_ptr<torrent> t = m_torrent.lock();
|
boost::shared_ptr<torrent> t = m_torrent.lock();
|
||||||
TORRENT_ASSERT(t);
|
TORRENT_ASSERT(t);
|
||||||
|
|
||||||
|
if (!is_choked())
|
||||||
|
{
|
||||||
|
if (m_peer_info && m_peer_info->optimistically_unchoked)
|
||||||
|
{
|
||||||
|
m_peer_info->optimistically_unchoked = false;
|
||||||
|
m_ses.m_optimistic_unchoke_time_scaler = 0;
|
||||||
|
}
|
||||||
|
t->choke_peer(*this);
|
||||||
|
--m_ses.m_num_unchoked;
|
||||||
|
m_ses.m_unchoke_time_scaler = 0;
|
||||||
|
}
|
||||||
|
|
||||||
t->get_policy().not_interested(*this);
|
t->get_policy().not_interested(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1129,7 +1129,7 @@ namespace libtorrent
|
||||||
if (new_piece_priority == int(p.piece_priority)) return false;
|
if (new_piece_priority == int(p.piece_priority)) return false;
|
||||||
|
|
||||||
int prev_priority = p.priority(this);
|
int prev_priority = p.priority(this);
|
||||||
TORRENT_ASSERT(m_dirty | prev_priority < int(m_priority_boundries.size()));
|
TORRENT_ASSERT(m_dirty || prev_priority < int(m_priority_boundries.size()));
|
||||||
|
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
if (new_piece_priority == piece_pos::filter_priority
|
if (new_piece_priority == piece_pos::filter_priority
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue