소스 검색

Drop connection if client and peer are both seeders.

Tatsuhiro Tsujikawa 14 년 전
부모
커밋
653951f70a
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  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()