mirror of https://github.com/aria2/aria2
2009-04-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that upload limit exceeds the value specified in --seed-ratio option depending on the timing of the execution of SeedCheckCommand. * src/SeedCheckCommand.ccpull/1/head
parent
bcb22e756e
commit
bf94abba7b
|
@ -1,3 +1,10 @@
|
||||||
|
2009-04-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
|
Fixed the bug that upload limit exceeds the value specified in
|
||||||
|
--seed-ratio option depending on the timing of the execution of
|
||||||
|
SeedCheckCommand.
|
||||||
|
* src/SeedCheckCommand.cc
|
||||||
|
|
||||||
2009-04-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
2009-04-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
Fixed the bug that removed peer's session upload/download length
|
Fixed the bug that removed peer's session upload/download length
|
||||||
|
|
|
@ -53,7 +53,10 @@ SeedCheckCommand::SeedCheckCommand(int cuid,
|
||||||
e(e),
|
e(e),
|
||||||
_btContext(btContext),
|
_btContext(btContext),
|
||||||
seedCriteria(seedCriteria),
|
seedCriteria(seedCriteria),
|
||||||
checkStarted(false) {}
|
checkStarted(false)
|
||||||
|
{
|
||||||
|
setStatusRealtime();
|
||||||
|
}
|
||||||
|
|
||||||
bool SeedCheckCommand::execute() {
|
bool SeedCheckCommand::execute() {
|
||||||
if(_btRuntime->isHalt()) {
|
if(_btRuntime->isHalt()) {
|
||||||
|
@ -62,18 +65,16 @@ bool SeedCheckCommand::execute() {
|
||||||
if(!seedCriteria.get()) {
|
if(!seedCriteria.get()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(checkPoint.elapsed(1)) {
|
if(!checkStarted) {
|
||||||
if(!checkStarted) {
|
if(_pieceStorage->downloadFinished()) {
|
||||||
if(_pieceStorage->downloadFinished()) {
|
checkStarted = true;
|
||||||
checkStarted = true;
|
seedCriteria->reset();
|
||||||
seedCriteria->reset();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if(checkStarted) {
|
}
|
||||||
if(seedCriteria->evaluate()) {
|
if(checkStarted) {
|
||||||
logger->notice(MSG_SEEDING_END);
|
if(seedCriteria->evaluate()) {
|
||||||
_btRuntime->setHalt(true);
|
logger->notice(MSG_SEEDING_END);
|
||||||
}
|
_btRuntime->setHalt(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
e->commands.push_back(this);
|
e->commands.push_back(this);
|
||||||
|
|
Loading…
Reference in New Issue