mirror of https://github.com/aria2/aria2
2010-09-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Made small optimization. * src/DownloadCommand.ccpull/1/head
parent
aea9199b40
commit
ac7d8dc483
|
@ -1,3 +1,8 @@
|
|||
2010-09-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Made small optimization.
|
||||
* src/DownloadCommand.cc
|
||||
|
||||
2010-09-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Reset download start time of PeerStat because it is started before
|
||||
|
|
|
@ -258,11 +258,11 @@ bool DownloadCommand::executeInternal() {
|
|||
|
||||
void DownloadCommand::checkLowestDownloadSpeed() const
|
||||
{
|
||||
// calculate downloading speed
|
||||
if(peerStat_->getDownloadStartTime().difference(global::wallclock) >=
|
||||
if(lowestDownloadSpeedLimit_ > 0 &&
|
||||
peerStat_->getDownloadStartTime().difference(global::wallclock) >=
|
||||
startupIdleTime_) {
|
||||
unsigned int nowSpeed = peerStat_->calculateDownloadSpeed();
|
||||
if(lowestDownloadSpeedLimit_ > 0 && nowSpeed <= lowestDownloadSpeedLimit_) {
|
||||
if(nowSpeed <= lowestDownloadSpeedLimit_) {
|
||||
throw DL_ABORT_EX2(StringFormat(EX_TOO_SLOW_DOWNLOAD_SPEED,
|
||||
nowSpeed,
|
||||
lowestDownloadSpeedLimit_,
|
||||
|
|
Loading…
Reference in New Issue