fixed tracker prioritization bug
This commit is contained in:
parent
6d3d58020a
commit
9c5c0418ba
|
@ -3648,7 +3648,8 @@ namespace libtorrent
|
|||
{
|
||||
using std::swap;
|
||||
swap(m_trackers[index], m_trackers[index-1]);
|
||||
if (m_last_working_tracker == index) ++m_last_working_tracker;
|
||||
if (m_last_working_tracker == index) --m_last_working_tracker;
|
||||
else if (m_last_working_tracker == index - 1) ++m_last_working_tracker;
|
||||
--index;
|
||||
}
|
||||
return index;
|
||||
|
@ -3666,7 +3667,8 @@ namespace libtorrent
|
|||
{
|
||||
using std::swap;
|
||||
swap(m_trackers[index], m_trackers[index + 1]);
|
||||
if (m_last_working_tracker == index) --m_last_working_tracker;
|
||||
if (m_last_working_tracker == index) ++m_last_working_tracker;
|
||||
else if (m_last_working_tracker == index + 1) --m_last_working_tracker;
|
||||
++index;
|
||||
}
|
||||
return index;
|
||||
|
|
Loading…
Reference in New Issue