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
|
- (void) stopTorrents: (NSArray *) torrents
|
||||||
{
|
{
|
||||||
#warning look into stopping all without starting any
|
|
||||||
//don't want any of these starting then stopping
|
//don't want any of these starting then stopping
|
||||||
/*for (Torrent * torrent in torrents)
|
for (Torrent * torrent in torrents)
|
||||||
[torrent setWaitToStart: NO];*/
|
if ([torrent waitingToStart])
|
||||||
|
[torrent stopTransfer];
|
||||||
|
|
||||||
for (Torrent * torrent in torrents)
|
for (Torrent * torrent in torrents)
|
||||||
[torrent stopTransfer];
|
[torrent stopTransfer];
|
||||||
|
@ -1333,10 +1333,10 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
|
||||||
NSMutableArray * selectedValues = [NSMutableArray arrayWithArray: [fTableView selectedValues]];
|
NSMutableArray * selectedValues = [NSMutableArray arrayWithArray: [fTableView selectedValues]];
|
||||||
[selectedValues removeObjectsInArray: torrents];
|
[selectedValues removeObjectsInArray: torrents];
|
||||||
|
|
||||||
#warning look into stopping all without starting any
|
|
||||||
//don't want any of these starting then stopping
|
//don't want any of these starting then stopping
|
||||||
/*for (Torrent * torrent in torrents)
|
for (Torrent * torrent in torrents)
|
||||||
[torrent setWaitToStart: NO];*/
|
if ([torrent waitingToStart])
|
||||||
|
[torrent stopTransfer];
|
||||||
|
|
||||||
[fTorrents removeObjectsInArray: torrents];
|
[fTorrents removeObjectsInArray: torrents];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue