Changeset 9429
- Timestamp:
- Oct 28, 2009, 4:53:39 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/announcer.c
r9419 r9429 1207 1207 sizeof( tier->lastAnnounceStr ) ); 1208 1208 1209 tier->lastAnnounceTime = now; 1210 1209 1211 /* if the response is serious, *and* if the response may require 1210 1212 * human intervention, then notify the user... otherwise just log it */ … … 1270 1272 publishErrorMessageAndStop( tier, _( "Tracker returned a 4xx message" ) ); 1271 1273 tier->manualAnnounceAllowedAt = ~(time_t)0; 1274 tierClearNextAnnounce( tier ); 1272 1275 } 1273 1276 else if( 500 <= responseCode && responseCode <= 599 ) … … 1477 1480 const int interval = tier->retryScrapeIntervalSec; 1478 1481 tier->retryScrapeIntervalSec *= 2; 1479 tier->scrapeAt = now + interval; 1482 1483 /* Don't retry on a 4xx. 1484 * Retry at growing intervals on a 5xx */ 1485 if( 400 <= responseCode && responseCode <= 499 ) 1486 tier->scrapeAt = 0; 1487 else 1488 tier->scrapeAt = now + interval; 1480 1489 1481 1490 /* %1$ld - http status code, such as 404 … … 1559 1568 { 1560 1569 return !tier->isScraping 1570 && ( tier->scrapeAt != 0 ) 1561 1571 && ( tier->scrapeAt <= now ) 1562 1572 && ( tier->currentTracker != NULL ) … … 1712 1722 if( tier->isScraping ) 1713 1723 st->scrapeState = TR_TRACKER_ACTIVE; 1724 else if( !tier->scrapeAt ) 1725 st->scrapeState = TR_TRACKER_INACTIVE; 1714 1726 else if( tier->scrapeAt > now ) 1715 1727 { … … 1732 1744 if( tier->isAnnouncing ) 1733 1745 st->announceState = TR_TRACKER_ACTIVE; 1734 else if( !torrent->isRunning )1746 else if( !torrent->isRunning || !tier->announceAt ) 1735 1747 st->announceState = TR_TRACKER_INACTIVE; 1736 1748 else if( tier->announceAt > now )
Note: See TracChangeset
for help on using the changeset viewer.