mirror of https://github.com/aria2/aria2
2010-07-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Prefer untested server in FeedbackURISelector * src/FeedbackURISelector.ccpull/1/head
parent
86222984cb
commit
1984c2a542
|
@ -1,3 +1,8 @@
|
|||
2010-07-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Prefer untested server in FeedbackURISelector
|
||||
* src/FeedbackURISelector.cc
|
||||
|
||||
2010-07-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Documented --min-split-size option in man page.
|
||||
|
|
|
@ -100,11 +100,16 @@ std::string FeedbackURISelector::selectInternal
|
|||
}
|
||||
SharedHandle<ServerStat> ss =
|
||||
serverStatMan_->find(r.getHost(), r.getProtocol());
|
||||
if(!ss.isNull() && ss->isOK() && ss->getDownloadSpeed() > SPEED_THRESHOLD) {
|
||||
fastCands.push_back(std::make_pair(ss, *i));
|
||||
// We prefer untested one.
|
||||
if(ss.isNull()) {
|
||||
return *i;
|
||||
}
|
||||
if(ss.isNull() || ss->isOK()) {
|
||||
normCands.push_back(*i);
|
||||
if(ss->isOK()) {
|
||||
if(ss->getDownloadSpeed() > SPEED_THRESHOLD) {
|
||||
fastCands.push_back(std::make_pair(ss, *i));
|
||||
} else {
|
||||
normCands.push_back(*i);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(fastCands.empty()) {
|
||||
|
|
Loading…
Reference in New Issue