Stop waiting transfers before stopping others. This way, for a group of transfers to be stopped, a waiting one won't start if an active one is stopped first.
This commit is contained in:
parent
897e2f2e51
commit
b59cb97da4
|
@ -1233,10 +1233,10 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
|
|||
|
||||
- (void) stopTorrents: (NSArray *) torrents
|
||||
{
|
||||
#warning look into stopping all without starting any
|
||||
//don't want any of these starting then stopping
|
||||
/*for (Torrent * torrent in torrents)
|
||||
[torrent setWaitToStart: NO];*/
|
||||
for (Torrent * torrent in torrents)
|
||||
if ([torrent waitingToStart])
|
||||
[torrent stopTransfer];
|
||||
|
||||
for (Torrent * torrent in torrents)
|
||||
[torrent stopTransfer];
|
||||
|
@ -1333,10 +1333,10 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
|
|||
NSMutableArray * selectedValues = [NSMutableArray arrayWithArray: [fTableView selectedValues]];
|
||||
[selectedValues removeObjectsInArray: torrents];
|
||||
|
||||
#warning look into stopping all without starting any
|
||||
//don't want any of these starting then stopping
|
||||
/*for (Torrent * torrent in torrents)
|
||||
[torrent setWaitToStart: NO];*/
|
||||
for (Torrent * torrent in torrents)
|
||||
if ([torrent waitingToStart])
|
||||
[torrent stopTransfer];
|
||||
|
||||
[fTorrents removeObjectsInArray: torrents];
|
||||
|
||||
|
|
Loading…
Reference in New Issue