Don't search faster server using ServerStatMan if req_ is null or

total length is unknown.
pull/1/head
Tatsuhiro Tsujikawa 2011-06-29 21:30:32 +09:00
parent 644bb4e817
commit d2e76eca47
1 changed files with 3 additions and 2 deletions

View File

@ -180,8 +180,9 @@ bool AbstractCommand::execute() {
}
}
// Don't use this feature if PREF_MAX_{OVERALL_}DOWNLOAD_LIMIT
// is used
if(e_->getRequestGroupMan()->getMaxOverallDownloadSpeedLimit() == 0 &&
// is used or total length is unknown.
if(req_ && fileEntry_->getLength() > 0 &&
e_->getRequestGroupMan()->getMaxOverallDownloadSpeedLimit() == 0 &&
requestGroup_->getMaxDownloadSpeedLimit() == 0 &&
serverStatTimer_.difference(global::wallclock) >= 10) {
serverStatTimer_ = global::wallclock;