Changeset 3262
- Timestamp:
- Oct 1, 2007, 5:51:07 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/peer-mgr.c
r3261 r3262 63 63 MAX_CONNECTED_PEERS_PER_TORRENT = 60, 64 64 65 MAX_RECONNECTIONS_PER_MINUTE = MAX_CONNECTED_PEERS_PER_TORRENT, 66 MAX_RECONNECTIONS_PER_PULSE = ((MAX_RECONNECTIONS_PER_MINUTE * RECONNECT_PERIOD_MSEC) / (60*1000)), 65 67 66 68 ADDED_F_ENCRYPTION_FLAG = 1, … … 1634 1636 const int peerCount = tr_ptrArraySize( t->peers ); 1635 1637 1636 fprintf( stderr, "RECONNECT pulse for [%s]: %d weak connections, %d connection candidates, %d atoms \n",1637 t->tor->info.name, nConnections, nCandidates, tr_ptrArraySize(t->pool) );1638 fprintf( stderr, "RECONNECT pulse for [%s]: %d weak connections, %d connection candidates, %d atoms, max per pulse is %d\n", 1639 t->tor->info.name, nConnections, nCandidates, tr_ptrArraySize(t->pool), (int)MAX_RECONNECTIONS_PER_PULSE ); 1638 1640 1639 1641 for( i=0; i<nConnections; ++i ) … … 1652 1654 /* add some new ones */ 1653 1655 nAdd = MAX_CONNECTED_PEERS_PER_TORRENT - peerCount; 1654 for( i=0; i<nAdd && i<nCandidates ; ++i ) {1656 for( i=0; i<nAdd && i<nCandidates && i<MAX_RECONNECTIONS_PER_PULSE; ++i ) { 1655 1657 struct peer_atom * atom = candidates[i]; 1656 1658 tr_peerIo * io = tr_peerIoNewOutgoing( t->manager->handle, &atom->addr, atom->port, t->hash );
Note: See TracChangeset
for help on using the changeset viewer.