소스 검색

Make initial connection size of bittorrent 40

Tatsuhiro Tsujikawa 18 년 전
부모
커밋
62e2056d09
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      src/BtRuntime.h
  2. 1 1
      src/DefaultBtInteractive.cc

+ 1 - 1
src/BtRuntime.h

@@ -38,7 +38,7 @@
 #include "common.h"
 #include "SharedHandle.h"
 
-#define MIN_PEERS 15
+#define MIN_PEERS 40
 
 class BtRuntime {
 private:

+ 1 - 1
src/DefaultBtInteractive.cc

@@ -278,7 +278,7 @@ void DefaultBtInteractive::detectMessageFlooding() {
 void DefaultBtInteractive::checkActiveInteraction()
 {
   int32_t interval = 5*60;
-  if(inactiveCheckPoint.elapsed(interval) && btRuntime->getConnections() >= MAX_PEERS) {
+  if(inactiveCheckPoint.elapsed(interval)) {
     throw new DlAbortEx(EX_DROP_INACTIVE_CONNECTION, interval);
   }
 }