Explorar o código

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

Tatsuhiro Tsujikawa %!s(int64=9) %!d(string=hai) anos
pai
achega
10b64e281a
Modificáronse 2 ficheiros con 6 adicións e 0 borrados
  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