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
pull/1/head
Tatsuhiro Tsujikawa 2009-04-07 14:24:44 +00:00
parent bcb22e756e
commit bf94abba7b
2 changed files with 20 additions and 12 deletions

View File

@ -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>
Fixed the bug that removed peer's session upload/download length

View File

@ -53,7 +53,10 @@ SeedCheckCommand::SeedCheckCommand(int cuid,
e(e),
_btContext(btContext),
seedCriteria(seedCriteria),
checkStarted(false) {}
checkStarted(false)
{
setStatusRealtime();
}
bool SeedCheckCommand::execute() {
if(_btRuntime->isHalt()) {
@ -62,7 +65,6 @@ bool SeedCheckCommand::execute() {
if(!seedCriteria.get()) {
return false;
}
if(checkPoint.elapsed(1)) {
if(!checkStarted) {
if(_pieceStorage->downloadFinished()) {
checkStarted = true;
@ -75,7 +77,6 @@ bool SeedCheckCommand::execute() {
_btRuntime->setHalt(true);
}
}
}
e->commands.push_back(this);
return false;
}