Skip to content

Instantly share code, notes, and snippets.

@sormy
sormy / libtorrent-sequential-download.patch
Created October 24, 2017 04:45
rtorrent/libtorrent sequential download patch
diff --git a/src/download/chunk_selector.cc b/src/download/chunk_selector.cc
index 850fec0f..248a29f9 100644
--- a/src/download/chunk_selector.cc
+++ b/src/download/chunk_selector.cc
@@ -82,7 +82,7 @@ ChunkSelector::update_priorities() {
m_sharedQueue.clear();
if (m_position == invalid_chunk)
- m_position = random() % size();
+ m_position = 0;