Ignore:
Timestamp:
Dec 15, 2007, 4:26:31 AM (14 years ago)
Author:
charles
Message:

lessons learned from 0.82:

  • if we can't bind a socket to a peer, take that peer out of the retry pool.
  • also, try to connect with more peers up-front.
File:
1 edited

Legend:

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

    r4036 r4173  
    175175                      const uint8_t         * torrentHash )
    176176{
     177    int socket;
     178
    177179    assert( handle != NULL );
    178180    assert( in_addr != NULL );
     
    180182    assert( torrentHash != NULL );
    181183
    182     return tr_peerIoNew( handle, in_addr, port,
    183                          torrentHash, 0,
    184                          tr_netOpenTCP( in_addr, port, 0 ) );
     184    socket = tr_netOpenTCP( in_addr, port, 0 );
     185
     186    return socket < 0
     187        ? NULL
     188        : tr_peerIoNew( handle, in_addr, port, torrentHash, 0, socket );
    185189}
    186190
Note: See TracChangeset for help on using the changeset viewer.