2010-07-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Prefer untested server in FeedbackURISelector
	* src/FeedbackURISelector.cc
pull/1/head
Tatsuhiro Tsujikawa 2010-07-15 11:48:32 +00:00
parent 86222984cb
commit 1984c2a542
2 changed files with 14 additions and 4 deletions

View File

@ -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.

View File

@ -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()) {