Changeset 3878
- Timestamp:
- Nov 18, 2007, 5:35:28 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/peer-mgr.c
r3876 r3878 75 75 76 76 /* how frequently to decide which peers live and die */ 77 RECONNECT_PERIOD_MSEC = ( 5* 1000),77 RECONNECT_PERIOD_MSEC = (6 * 1000), 78 78 79 79 /* how frequently to refill peers' request lists */ … … 88 88 89 89 /* arbitrary */ 90 MAX_CONNECTED_PEERS_PER_TORRENT = 60,90 MAX_CONNECTED_PEERS_PER_TORRENT = 50, 91 91 92 92 /* when many peers are available, keep idle ones this long */ … … 98 98 /* how many peers to unchoke per-torrent. */ 99 99 /* FIXME: make this user-configurable? */ 100 NUM_UNCHOKED_PEERS_PER_TORRENT = 20, /* arbitrary */100 NUM_UNCHOKED_PEERS_PER_TORRENT = 10, /* arbitrary */ 101 101 102 102 /* set this too high and there will be a lot of churn. … … 1808 1808 else 1809 1809 { 1810 int i, nCandidates, nBad , nAdd;1810 int i, nCandidates, nBad; 1811 1811 struct peer_atom ** candidates = getPeerCandidates( t, &nCandidates ); 1812 1812 struct tr_peer ** connections = getPeersToClose( t, &nBad ); 1813 const int peerCount = tr_ptrArraySize( t->peers );1814 1813 1815 1814 if( nBad || nCandidates ) … … 1835 1834 1836 1835 /* add some new ones */ 1837 nAdd = !peerCount ? MAX_CONNECTED_PEERS_PER_TORRENT 1838 : MAX_RECONNECTIONS_PER_PULSE; 1839 for( i=0; i<nAdd && i<nCandidates && i<MAX_RECONNECTIONS_PER_PULSE; ++i ) 1836 for( i=0; i<nCandidates && i<MAX_RECONNECTIONS_PER_PULSE; ++i ) 1840 1837 { 1841 1838 tr_peerMgr * mgr = t->manager;
Note: See TracChangeset
for help on using the changeset viewer.