allow sleep if the only active torrents are stalled or have errors

This commit is contained in:
Mitchell Livingston 2007-08-27 18:32:34 +00:00
parent aa80a14a79
commit 65ac0968ef
1 changed files with 1 additions and 1 deletions

View File

@ -2990,7 +2990,7 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
active = NO;
enumerator = [fTorrents objectEnumerator];
while ((torrent = [enumerator nextObject]))
if ([torrent isActive])
if ([torrent isActive] && ![torrent isStalled] && ![torrent isError])
{
active = YES;
break;