From 62e2056d09d143d7308f0c98c63beee1201f6cf8 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 9 Aug 2007 14:47:47 +0000 Subject: [PATCH] Make initial connection size of bittorrent 40 --- src/BtRuntime.h | 2 +- src/DefaultBtInteractive.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BtRuntime.h b/src/BtRuntime.h index 4e1b7892..4b58f748 100644 --- a/src/BtRuntime.h +++ b/src/BtRuntime.h @@ -38,7 +38,7 @@ #include "common.h" #include "SharedHandle.h" -#define MIN_PEERS 15 +#define MIN_PEERS 40 class BtRuntime { private: diff --git a/src/DefaultBtInteractive.cc b/src/DefaultBtInteractive.cc index 0263bc43..c3ab0676 100644 --- a/src/DefaultBtInteractive.cc +++ b/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); } }