Changeset 4168


Ignore:
Timestamp:
Dec 13, 2007, 11:43:50 PM (14 years ago)
Author:
charles
Message:

increase the number of tracker connections we allow during shutdown.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/tracker.c

    r4166 r4168  
    4040    /* maximum number of concurrent tracker socket connections */
    4141    MAX_TRACKER_SOCKETS = 16,
     42
     43    /* maximum number of concurrent tracker socket connections during shutdown.
     44     * all the peer connections should be gone by now, so we can hog more
     45     * connections to send `stop' messages to the trackers */
     46    MAX_TRACKER_SOCKETS_DURING_SHUTDOWN = 64,
    4247
    4348    /* unless the tracker says otherwise, rescrape this frequently */
     
    871876socketIsAvailable( tr_handle * handle )
    872877{
    873     int max = MAX_TRACKER_SOCKETS;
    874     if( handle->tracker->isShuttingDown )
    875         max *= 2;
     878    const int max = handle->tracker->isShuttingDown
     879                      ? MAX_TRACKER_SOCKETS_DURING_SHUTDOWN
     880                      : MAX_TRACKER_SOCKETS;
    876881    return handle->tracker->socketCount < max;
    877882}
Note: See TracChangeset for help on using the changeset viewer.