diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-01-07 00:20:10 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-01-07 00:20:10 +0900 |
| commit | 653951f70aeca5dac555efb623e2eaf6bbbca47f (patch) | |
| tree | 5fce40aba73522cbb2f979b2b2033e5a101956e6 /src/DefaultBtInteractive.cc | |
| parent | b6d5c389b8fcc3fbd81eb368e42adc83806d5627 (diff) | |
Drop connection if client and peer are both seeders.
Diffstat (limited to 'src/DefaultBtInteractive.cc')
| -rw-r--r-- | src/DefaultBtInteractive.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/DefaultBtInteractive.cc b/src/DefaultBtInteractive.cc index 1b8ff029..01d8b73f 100644 --- a/src/DefaultBtInteractive.cc +++ b/src/DefaultBtInteractive.cc @@ -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() |
