mirror of
https://github.com/transmission/transmission
synced 2025-02-23 22:50:41 +00:00
tweak some more. follow BentMyWookie's suggestion for raising the connection limits.
This commit is contained in:
parent
a33a033b9b
commit
3c73a86595
1 changed files with 3 additions and 7 deletions
|
@ -67,8 +67,8 @@ enum
|
||||||
MAX_TRANSFER_IDLE = 240000,
|
MAX_TRANSFER_IDLE = 240000,
|
||||||
|
|
||||||
/* this is arbitrary and, hopefully, temporary until we come up
|
/* this is arbitrary and, hopefully, temporary until we come up
|
||||||
* with a better idea */
|
* with a better idea for managing the connection limits */
|
||||||
MAX_CONNECTED_PEERS_PER_TORRENT = 40,
|
MAX_CONNECTED_PEERS_PER_TORRENT = 60,
|
||||||
|
|
||||||
/* if we hang up on a peer for being worthless, don't try to
|
/* if we hang up on a peer for being worthless, don't try to
|
||||||
* reconnect to it for this long. */
|
* reconnect to it for this long. */
|
||||||
|
@ -637,10 +637,8 @@ msgsCallbackFunc( void * vpeer, void * vevent, void * vt )
|
||||||
case TR_PEERMSG_PEER_PROGRESS: { /* if we're both seeds, then disconnect. */
|
case TR_PEERMSG_PEER_PROGRESS: { /* if we're both seeds, then disconnect. */
|
||||||
const int clientIsSeed = tr_cpGetStatus( t->tor->completion ) != TR_CP_INCOMPLETE;
|
const int clientIsSeed = tr_cpGetStatus( t->tor->completion ) != TR_CP_INCOMPLETE;
|
||||||
const int peerIsSeed = e->progress >= 1.0;
|
const int peerIsSeed = e->progress >= 1.0;
|
||||||
if( clientIsSeed && peerIsSeed ) {
|
if( clientIsSeed && peerIsSeed )
|
||||||
fprintf( stderr, "DISCONNECTING FROM PEER %s because both of us are seeds\n", tr_peerIoGetAddrStr(peer->io) );
|
|
||||||
peer->doDisconnect = 1;
|
peer->doDisconnect = 1;
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -649,7 +647,6 @@ msgsCallbackFunc( void * vpeer, void * vevent, void * vt )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TR_PEERMSG_GOT_ERROR:
|
case TR_PEERMSG_GOT_ERROR:
|
||||||
fprintf( stderr, "DISCONNECTING FROM PEER %s because we got an error\n", tr_peerIoGetAddrStr(peer->io));
|
|
||||||
peer->doDisconnect = 1;
|
peer->doDisconnect = 1;
|
||||||
reconnectSoon( t );
|
reconnectSoon( t );
|
||||||
break;
|
break;
|
||||||
|
@ -1218,7 +1215,6 @@ reconnectPulse( void * vt UNUSED )
|
||||||
for( i=0; i<size; ++i ) {
|
for( i=0; i<size; ++i ) {
|
||||||
tr_peer * peer = peers[i];
|
tr_peer * peer = peers[i];
|
||||||
if( shouldPeerBeDisconnected( t, peer, liveCount, isSeeding ) ) {
|
if( shouldPeerBeDisconnected( t, peer, liveCount, isSeeding ) ) {
|
||||||
fprintf( stderr, "[%s] %s is a bum. I'm hanging up on them.\n", t->tor->info.name, tr_peerIoGetAddrStr(peer->io) );
|
|
||||||
disconnectPeer( peer );
|
disconnectPeer( peer );
|
||||||
--liveCount;
|
--liveCount;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue