Changeset 10544
- Timestamp:
- Apr 29, 2010, 3:21:54 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/peer-mgr.c
r10510 r10544 3344 3344 const time_t now = tr_time( ); 3345 3345 const uint64_t now_msec = tr_date( ); 3346 /* leave 5% of connection slots for incoming connections -- ticket #2609 */ 3347 const int maxCandidates = tr_sessionGetPeerLimit( session ) * 0.95; 3346 3348 3347 3349 /* don't start any new handshakes if we're full up */ … … 3350 3352 while(( tor = tr_torrentNext( session, tor ))) 3351 3353 n += tr_ptrArraySize( &tor->torrentPeers->peers ); 3352 if( tr_sessionGetPeerLimit( session )<= n ) {3354 if( maxCandidates <= n ) { 3353 3355 *candidateCount = 0; 3354 3356 return NULL;
Note: See TracChangeset
for help on using the changeset viewer.