Drop connection if client and peer are both seeders.

pull/1/head
Tatsuhiro Tsujikawa 2011-01-07 00:20:10 +09:00
parent b6d5c389b8
commit 653951f70a
1 changed files with 4 additions and 0 deletions

View File

@ -461,6 +461,10 @@ void DefaultBtInteractive::checkActiveInteraction()
static_cast<long int>(interval)));
}
}
// If both of us are seeders, drop connection.
if(peer_->isSeeder() && pieceStorage_->downloadFinished()) {
throw DL_ABORT_EX(MSG_GOOD_BYE_SEEDER);
}
}
void DefaultBtInteractive::addPeerExchangeMessage()