Przeglądaj źródła

2008-04-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

	Fixed the bug that aria2 exits when commands is empty() but
	_routineCommands are not.
	* src/DownloadEngine.cc
Tatsuhiro Tsujikawa 17 lat temu
rodzic
commit
4f6df4be39
2 zmienionych plików z 7 dodań i 1 usunięć
  1. 6 0
      ChangeLog
  2. 1 1
      src/DownloadEngine.cc

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+2008-04-23  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
+
+	Fixed the bug that aria2 exits when commands is empty() but
+	_routineCommands are not.
+	* src/DownloadEngine.cc
+
 2008-04-22  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
 	Use the default value pulled from Option object in HelpItemFactory.

+ 1 - 1
src/DownloadEngine.cc

@@ -128,7 +128,7 @@ static void executeCommand(std::deque<Command*>& commands,
 void DownloadEngine::run() {
   Time cp;
   cp.setTimeInSec(0);
-  while(!commands.empty()) {
+  while(!commands.empty() || !_routineCommands.empty()) {
     if(cp.elapsed(1)) {
       cp.reset();
       executeCommand(commands, Command::STATUS_ALL);