Ignore:
Timestamp:
Sep 26, 2007, 2:42:03 PM (15 years ago)
Author:
charles
Message:

peer i/o cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer-mgr.c

    r3183 r3184  
    722722        tr_peerIoFree( io );
    723723        --manager->connectionCount;
    724         if( peer ) {
    725             tr_ptrArrayRemoveSorted( t->peers, peer, peerCompare );
    726             freePeer( peer );
    727         }
     724        if( peer )
     725            peer->doPurge = 1;
    728726        return;
    729727    }
     
    11791177        return TRUE;
    11801178
     1179    /* not enough peers to go around... might as well keep this one;
     1180     * they might unchoke us or give us a pex or something */
     1181    if( peerCount < MAX_CONNECTED_PEERS_PER_TORRENT )
     1182        return FALSE;
     1183
    11811184    /* when deciding whether or not to keep a peer, judge its responsiveness
    11821185       on a sliding scale that's based on how many other peers are available */
Note: See TracChangeset for help on using the changeset viewer.