From 0fb88abae2bccff473aaa035a4a566a647ed677b Mon Sep 17 00:00:00 2001 From: upstream svn Date: Sun, 26 Sep 2010 13:16:37 +0000 Subject: [PATCH] No reason to drop requests of already downloading clients if the upload queue is full --- .svn-revision | 2 +- src/UploadQueue.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.svn-revision b/.svn-revision index 817b26ce..54fe1c18 100644 --- a/.svn-revision +++ b/.svn-revision @@ -1 +1 @@ -10295 +10296 diff --git a/src/UploadQueue.cpp b/src/UploadQueue.cpp index d417b64f..6fc191ae 100644 --- a/src/UploadQueue.cpp +++ b/src/UploadQueue.cpp @@ -413,11 +413,6 @@ void CUploadQueue::AddClientToQueue(CUpDownClient* client) reqfile->statistic.AddRequest(); } - // TODO find better ways to cap the list - if (m_waitinglist.size() >= (thePrefs::GetQueueSize())) { - return; - } - if (client->IsDownloading()) { // he's already downloading and wants probably only another file CPacket* packet = new CPacket(OP_ACCEPTUPLOADREQ, 0, OP_EDONKEYPROT); @@ -427,6 +422,11 @@ void CUploadQueue::AddClientToQueue(CUpDownClient* client) return; } + // TODO find better ways to cap the list + if (m_waitinglist.size() >= (thePrefs::GetQueueSize())) { + return; + } + uint32 tick = GetTickCount(); client->ClearWaitStartTime(); // if possible start upload right away -- 2.11.4.GIT