mirror of https://github.com/aria2/aria2
Make initial connection size of bittorrent 40
parent
a405d0238e
commit
62e2056d09
|
@ -38,7 +38,7 @@
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "SharedHandle.h"
|
#include "SharedHandle.h"
|
||||||
|
|
||||||
#define MIN_PEERS 15
|
#define MIN_PEERS 40
|
||||||
|
|
||||||
class BtRuntime {
|
class BtRuntime {
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -278,7 +278,7 @@ void DefaultBtInteractive::detectMessageFlooding() {
|
||||||
void DefaultBtInteractive::checkActiveInteraction()
|
void DefaultBtInteractive::checkActiveInteraction()
|
||||||
{
|
{
|
||||||
int32_t interval = 5*60;
|
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);
|
throw new DlAbortEx(EX_DROP_INACTIVE_CONNECTION, interval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue