فهرست منبع

Ensure that lowest speed check is done even when download speed is 0

Tatsuhiro Tsujikawa 9 سال پیش
والد
کامیت
10b64e281a
2فایلهای تغییر یافته به همراه6 افزوده شده و 0 حذف شده
  1. 4 0
      src/DownloadCommand.cc
  2. 2 0
      src/DownloadCommand.h

+ 4 - 0
src/DownloadCommand.cc

@@ -419,4 +419,8 @@ void DownloadCommand::installStreamFilter(
   sinkFilterOnly_ = util::endsWith(name, SinkStreamFilter::NAME);
 }
 
+// We need to override noCheck() to return true in order to measure
+// download speed to check lowest speed.
+bool DownloadCommand::noCheck() const { return true; }
+
 } // namespace aria2

+ 2 - 0
src/DownloadCommand.h

@@ -72,6 +72,8 @@ private:
 protected:
   virtual bool executeInternal() CXX11_OVERRIDE;
 
+  virtual bool noCheck() const CXX11_OVERRIDE;
+
   virtual bool prepareForNextSegment();
 
   // This is file local offset