Start and stop transfers for launch/quit without performing checks for waiting transfers, etc. This should fix saving the incorrect states of running transfers between launches.

This commit is contained in:
Mitchell Livingston
2006-07-02 22:59:23 +00:00
parent cb9a16a0bd
commit e7ebf16d43
3 changed files with 13 additions and 7 deletions

View File

@@ -302,7 +302,7 @@ static void sleepCallBack(void * controller, io_service_t y,
- (void) applicationWillTerminate: (NSNotification *) notification
{
// Stop updating the interface
//stop updating the interface
[fTimer invalidate];
//save history
@@ -320,9 +320,9 @@ static void sleepCallBack(void * controller, io_service_t y,
if (fUpdateInProgress)
return;
//stop running torrents and wait for them to stop (5 seconds timeout)
[fTorrents makeObjectsPerformSelector: @selector(stopTransfer)];
//stop running transfers and wait for them to stop (5 seconds timeout)
[fTorrents makeObjectsPerformSelector: @selector(stopTransferForQuit)];
NSDate * start = [NSDate date];
Torrent * torrent;
while ([fTorrents count] > 0)