forked from premiere/premiere-libtorrent
fixed rare piece picker bug
This commit is contained in:
parent
f39b6b19e9
commit
57e7f14024
|
@ -94,6 +94,7 @@
|
|||
incoming connection
|
||||
* added more detailed instrumentation of the disk I/O thread
|
||||
|
||||
* fixed rare piece picker bug
|
||||
* fixed invalid torrent_status::finished_time
|
||||
* fixed bugs in dont-have and upload-only extension messages
|
||||
* don't open files in random-access mode (speeds up hashing)
|
||||
|
|
|
@ -833,14 +833,8 @@ namespace libtorrent
|
|||
|
||||
if (new_priority == prev_priority) return;
|
||||
if (m_dirty) return;
|
||||
if (prev_priority == -1)
|
||||
{
|
||||
add(index);
|
||||
}
|
||||
else
|
||||
{
|
||||
update(prev_priority, p.index);
|
||||
}
|
||||
if (prev_priority == -1) add(index);
|
||||
else update(prev_priority, p.index);
|
||||
}
|
||||
|
||||
void piece_picker::inc_refcount_all()
|
||||
|
@ -2252,7 +2246,7 @@ namespace libtorrent
|
|||
|
||||
if (m_dirty) return;
|
||||
if (new_priority == prev_priority) return;
|
||||
if (prev_priority == -1) add(p.index);
|
||||
if (prev_priority == -1) add(block.piece_index);
|
||||
else update(prev_priority, p.index);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue