summaryrefslogtreecommitdiffstats
path: root/libktorrent/torrent/queuemanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libktorrent/torrent/queuemanager.cpp')
-rw-r--r--libktorrent/torrent/queuemanager.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/libktorrent/torrent/queuemanager.cpp b/libktorrent/torrent/queuemanager.cpp
index 0c76b8a..bf64a2e 100644
--- a/libktorrent/torrent/queuemanager.cpp
+++ b/libktorrent/torrent/queuemanager.cpp
@@ -49,6 +49,7 @@ namespace bt
keep_seeding = true; //test. Will be passed from Core
paused_state = false;
+ ordering = false;
}
@@ -439,11 +440,13 @@ namespace bt
void QueueManager::orderQueue()
{
- if (!downloads.count())
+ if (!downloads.count() || ordering)
return;
if (paused_state || exiting)
return;
+
+ ordering = true;
downloads.sort();
@@ -584,7 +587,7 @@ namespace bt
}
}
}
-
+ ordering = false;
}
void QueueManager::torrentFinished(kt::TorrentInterface* tc)