Forráskód Böngészése

Drop connection if client and peer are both seeders.

Tatsuhiro Tsujikawa 14 éve
szülő
commit
653951f70a
1 módosított fájl, 4 hozzáadás és 0 törlés
  1. 4 0
      src/DefaultBtInteractive.cc

+ 4 - 0
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()