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>
|
2010-07-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
Documented --min-split-size option in man page.
|
Documented --min-split-size option in man page.
|
||||||
|
|
|
@ -100,13 +100,18 @@ std::string FeedbackURISelector::selectInternal
|
||||||
}
|
}
|
||||||
SharedHandle<ServerStat> ss =
|
SharedHandle<ServerStat> ss =
|
||||||
serverStatMan_->find(r.getHost(), r.getProtocol());
|
serverStatMan_->find(r.getHost(), r.getProtocol());
|
||||||
if(!ss.isNull() && ss->isOK() && ss->getDownloadSpeed() > SPEED_THRESHOLD) {
|
// We prefer untested one.
|
||||||
fastCands.push_back(std::make_pair(ss, *i));
|
if(ss.isNull()) {
|
||||||
|
return *i;
|
||||||
}
|
}
|
||||||
if(ss.isNull() || ss->isOK()) {
|
if(ss->isOK()) {
|
||||||
|
if(ss->getDownloadSpeed() > SPEED_THRESHOLD) {
|
||||||
|
fastCands.push_back(std::make_pair(ss, *i));
|
||||||
|
} else {
|
||||||
normCands.push_back(*i);
|
normCands.push_back(*i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(fastCands.empty()) {
|
if(fastCands.empty()) {
|
||||||
if(normCands.empty()) {
|
if(normCands.empty()) {
|
||||||
if(usedHosts.empty()) {
|
if(usedHosts.empty()) {
|
||||||
|
|
Loading…
Reference in New Issue