mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Don't move priority files to the end of the queue, when partner peer is not reachable. set the queue priority to +1 in the queue, so they will be first resumed after one of the lower priority downloads finished
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3961 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
8014ee372d
commit
d9d996c587
@ -385,7 +385,8 @@ void ftController::checkDownloadQueue()
|
|||||||
// - close it temporarily
|
// - close it temporarily
|
||||||
// - remove it from turtle handling
|
// - remove it from turtle handling
|
||||||
// - move the ftFileControl to queued list
|
// - move the ftFileControl to queued list
|
||||||
// - set the queue priority to 1+largest in the queue.
|
// - set the queue priority to +1 in the queue, so they will be first resumed
|
||||||
|
// after one of the lower priority downloads finished
|
||||||
// 1.2 - pop from the queue the 1st file to come (according to priority)
|
// 1.2 - pop from the queue the 1st file to come (according to priority)
|
||||||
// - enable turtle router handling for this hash
|
// - enable turtle router handling for this hash
|
||||||
// - reset counters
|
// - reset counters
|
||||||
@ -433,7 +434,15 @@ void ftController::checkDownloadQueue()
|
|||||||
#ifdef DEBUG_DWLQUEUE
|
#ifdef DEBUG_DWLQUEUE
|
||||||
std::cerr << " - Inactive file " << it->second->mName << " at position " << it->second->mQueuePosition << " moved to end of the queue. mState=" << it->second->mState << ", time lapse=" << now - it->second->mCreator->lastRecvTimeStamp() << std::endl ;
|
std::cerr << " - Inactive file " << it->second->mName << " at position " << it->second->mQueuePosition << " moved to end of the queue. mState=" << it->second->mState << ", time lapse=" << now - it->second->mCreator->lastRecvTimeStamp() << std::endl ;
|
||||||
#endif
|
#endif
|
||||||
locked_bottomQueue(it->second->mQueuePosition) ;
|
|
||||||
|
// notdefine: set the queue priority to +1 in the queue, so they will be first resumed
|
||||||
|
// after one of the lower priority downloads finished
|
||||||
|
// locked_bottomQueue(it->second->mQueuePosition) ;
|
||||||
|
|
||||||
|
if(it->second->mQueuePosition > 0)
|
||||||
|
locked_swapQueue(it->second->mQueuePosition,it->second->mQueuePosition-1) ;
|
||||||
|
break ;
|
||||||
|
|
||||||
#ifdef DEBUG_DWLQUEUE
|
#ifdef DEBUG_DWLQUEUE
|
||||||
std::cerr << " new position: " << it->second->mQueuePosition << std::endl ;
|
std::cerr << " new position: " << it->second->mQueuePosition << std::endl ;
|
||||||
std::cerr << " new state: " << it->second->mState << std::endl ;
|
std::cerr << " new state: " << it->second->mState << std::endl ;
|
||||||
|
Loading…
Reference in New Issue
Block a user