summaryrefslogtreecommitdiff
path: root/src/DefaultBtInteractive.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-01-07 00:20:10 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-01-07 00:20:10 +0900
commit653951f70aeca5dac555efb623e2eaf6bbbca47f (patch)
tree5fce40aba73522cbb2f979b2b2033e5a101956e6 /src/DefaultBtInteractive.cc
parentb6d5c389b8fcc3fbd81eb368e42adc83806d5627 (diff)
Drop connection if client and peer are both seeders.
Diffstat (limited to 'src/DefaultBtInteractive.cc')
-rw-r--r--src/DefaultBtInteractive.cc4
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()