diff options
-rw-r--r-- | trackerlogic.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/trackerlogic.c b/trackerlogic.c index 7d50ed4..9ca283e 100644 --- a/trackerlogic.c +++ b/trackerlogic.c | |||
@@ -550,8 +550,17 @@ void clean_all_torrents( void ) { | |||
550 | } | 550 | } |
551 | 551 | ||
552 | /* If nothing to be cleaned here, handle next torrent */ | 552 | /* If nothing to be cleaned here, handle next torrent */ |
553 | if( timedout > OT_POOLS_COUNT ) | 553 | if( timedout > OT_POOLS_COUNT ) { |
554 | continue; | 554 | |
555 | peers_count = 0; | ||
556 | for( k = 0; k < OT_POOLS_COUNT; ++k ) | ||
557 | peers_count += peer_list->peers[k].size; | ||
558 | |||
559 | if( !peers_count ) | ||
560 | continue; | ||
561 | |||
562 | timedout = OT_POOLS_COUNT; | ||
563 | } | ||
555 | 564 | ||
556 | /* Release vectors that have timed out */ | 565 | /* Release vectors that have timed out */ |
557 | for( k = OT_POOLS_COUNT - timedout; k < OT_POOLS_COUNT; ++k ) | 566 | for( k = OT_POOLS_COUNT - timedout; k < OT_POOLS_COUNT; ++k ) |