fixed bug in the disk thread that could get triggered under heavy load

This commit is contained in:
Arvid Norberg 2010-05-05 05:44:45 +00:00
parent 90ac0dbbcc
commit 85824b1924
2 changed files with 3 additions and 2 deletions

View File

@ -28,6 +28,7 @@
incoming connection
* added more detailed instrumentation of the disk I/O thread
* fixed bug in the disk thread that could get triggered under heavy load
* fixed bug in add_piece() that would trigger asserts
* fixed vs 2010 build
* recognizes more clients in identify_client()

View File

@ -1597,7 +1597,7 @@ namespace libtorrent
}
// if we've reached the end, change the elevator direction
if (elevator_job_pos == sorted_read_jobs.end() && elevator_direction == 1)
if (elevator_job_pos == sorted_read_jobs.end())
{
elevator_direction = -1;
--elevator_job_pos;
@ -1610,7 +1610,7 @@ namespace libtorrent
// if we've reached the begining of the sorted list,
// change the elvator direction
if (elevator_job_pos == sorted_read_jobs.begin() && elevator_direction == -1)
if (elevator_job_pos == sorted_read_jobs.begin())
elevator_direction = 1;
// move the elevator before erasing the job we're processing