Tatsuhiro Tsujikawa 19 年之前
父节点
当前提交
5fa0272558
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/TrackerInitCommand.cc

+ 2 - 1
src/TrackerInitCommand.cc

@@ -51,7 +51,8 @@ bool TrackerInitCommand::execute() {
     "port="+Util::itos(e->torrentMan->getPort())+"&"+
     "uploaded="+Util::llitos(e->torrentMan->getUploadedSize())+"&"+
     "downloaded="+Util::llitos(e->torrentMan->getDownloadedSize())+"&"+
-    "left="+(e->torrentMan->downloadComplete() ? "0" : Util::llitos(e->torrentMan->totalSize-e->torrentMan->getDownloadedSize()))+"&"+
+    "left="+(e->torrentMan->totalSize-e->torrentMan->getDownloadedSize() <= 0
+	     ? "0" : Util::llitos(e->torrentMan->totalSize-e->torrentMan->getDownloadedSize()))+"&"+
     "compact=1";
   if(!event.empty()) {
     url += string("&")+"event="+event;