diff options
author | erdgeist <> | 2007-10-06 19:17:21 +0000 |
---|---|---|
committer | erdgeist <> | 2007-10-06 19:17:21 +0000 |
commit | dd82db18ad50c391c22fe3e41d25d7eedf21528d (patch) | |
tree | 28ee866a3170cf975df905b16447a099f4a30edb | |
parent | 0d36a8754e75fbbbc55dd9d7bad311fce3b35fae (diff) |
There is a pool leak somewhere... try to find it
-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 ) |