瀏覽代碼

Set DownloadEngine::setNoWait(true) in SleepCommand.

Tatsuhiro Tsujikawa 14 年之前
父節點
當前提交
11d7e4fa46
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/SleepCommand.cc

+ 3 - 1
src/SleepCommand.cc

@@ -52,9 +52,11 @@ SleepCommand::~SleepCommand() {
 bool SleepCommand::execute() {
   if(requestGroup_->downloadFinished() || requestGroup_->isHaltRequested()) {
     return true;
-  } else if(checkPoint_.difference(global::wallclock) >= wait_) {
+  } else if(checkPoint_.differenceInMillis(global::wallclock)+A2_DELTA_MILLIS
+            >= wait_*1000) {
     engine_->addCommand(nextCommand_);
     nextCommand_ = 0;
+    engine_->setNoWait(true);
     return true;
   } else {
     engine_->addCommand(this);